title: Object Reference Not set to instance of an object error while using FirstOrDefault
body: <p>When I use this below code, I get object reference error, this might be because there is no match for "spider". My question is, How to check for null value in these situations</p>
  
  <pre><code>int fooID = foos.FirstOrDefault(f =&gt; f.Bar == "spider").ID;
  </code></pre>
  
  <p>I'm using this same scenario for different conditions for fetching different Items from the list like </p>
  
  <pre><code>int fooID = foos.FirstOrDefault(f =&gt; f.Bar == "spider").ID; 
  String fooDescription = foos.FirstOrDefault(f =&gt; f.Sides == "Cake").Description; 
  </code></pre>
  
  <p>Is there any other way to check for null values.</p>