title: How can I check for null values in this linq query where clause
body: <p>I have a linq query to locate a matching item in a SharePoint library. It works fine if there is a custom property called 'MMSTerm' but if the property is null then obviously my string modifications will fail and error out when it hits x["MMSTerm"]</p>
  
  <p>I will need to use string.replace in my where operation so a null won't be good.</p>
  
  <pre><code>SPListItem item = (from x in Items.OfType&lt;SPListItem&gt;()
                  where x["MMSTerm"].ToString() == pageReference.ToString()
                  select x).ToList&lt;SPListItem&gt;().FirstOrDefault();
  </code></pre>
  
  <p>Hopefully this is an easy one.</p>