title: MongoDB C# Nullable Datetime Query
body: <p>I'm trying to query a over mongoDB and I get the following error:</p>
  
  <blockquote>
    <p>Unable to determine the serialization information for the expression:
    c.IndexMetadata.Indexed.<strong>HasValue</strong>.</p>
  </blockquote>
  
  <p>where <strong>Indexed</strong> is a nullable datetime</p>
  
  <p>my query is the following:</p>
  
  <pre><code>Collection.AsQueryable&lt;Candidate&gt;(c =&gt; !c.IndexMetadata.Indexed.HasValue || c.IndexMetadata.Updated.Value &gt; c.IndexMetadata.Indexed.Value).ToList();
  </code></pre>
  
  <p>both <strong>indexed</strong> and <strong>updated</strong> are type of nullable datetime</p>
  
  <p>I guess that's because there's no direct translation from HasValue into a mongo Query, any workaround?</p>