title: Check if single() LINQ return NULL
body: <p>I have a LINQ query that should return either a single result or not results. I call <code>Single()</code> to get the result like this:</p>
  
  <pre><code>var propertyDataSource = (from x in myCollection
                            where SomeCondition(x)
                            select x).Single();
  </code></pre>
  
  <p>This works okay when my query has a single result, but if there are no results it throws a <code>System.InvalidOperationException</code> with the message <em>Sequence contains no elements</em>.</p>
  
  <p>How can I fix this?</p>