You need to use the default() keyword rather than null when dealing with ternary operators.
Example:
int? i = (true ? default(int?) : 0);
Alternately, you could just cast the null:
int? i = (true ? (int?)null : 0);
Personally I stick with the default()
notation, it's just a preference, really. But you should ultimately stick to just one specific notation, IMHO.
HTH!