title: Checking if no elements in IEnumerable(Of T) - Linq element and quantifier operators
body: <p>For my function</p>
  
  <pre><code>IEnumerable&lt;CallbackListRecord&gt; LoadOpenListToProcess(CallbackSearchParams usp);
  </code></pre>
  
  <p>This line errors when the sequence contains no elements (as it should)</p>
  
  <pre><code>CallbackListRecord nextRecord = CallbackSearch.LoadOpenListToProcess(p).First();
  </code></pre>
  
  <p>I have changed it to the following</p>
  
  <pre><code>CallbackListRecord nextRecord = null;
  IEnumerable&lt;CallbackListRecord&gt; nextRecords = CallbackSearch.LoadOpenListToProcess(p);
  if (nextRecords.Any())
  {
      nextRecord = nextRecords.First();
  }
  </code></pre>
  
  <p>Are there better, easier or more elegant ways to determine if the IEnumerable sequence has no elements?</p>