title: Why is Null an Invalid LINQ projection?
body: <p>I had the following statement, which always returns null:</p>
  
  <pre><code>var addins = allocations.SelectMany(
          set =&gt; set.locations.Any(q =&gt; q.IsMatch(level, count))
          ? (List&lt;string&gt;)set.addins : null
       );
  </code></pre>
  
  <p>I changed it slightly, and now it works fine:</p>
  
  <pre><code>var addins = allocations.SelectMany(
          set =&gt; set.locations.Any(q =&gt; q.IsMatch(level, count))
          ? set.addins : new List&lt;string&gt;()
       );
  </code></pre>
  
  <p>My primary question: Why can't null serve as a return type from the ternary operator in this context of LINQ?</p>
  
  <p>A secondary question: Is there a more clever way to formulate the above query (particularly if it eliminates the "new List()")?</p>