title: c# linq exception: object reference not set to an instance of an object
body: <p>When I run a linq query I get back the results only when an item can be found; if no items are found, it is throwing an exception "object reference not set to an instance of an object"</p>
  
  <p>How do I not throw this exception? I want only to return a result even if it is empty.</p>
  
  <pre><code>var id = db.table.Where(a =&gt; a.item == passed_item).FirstOrDefault().id;
  </code></pre>