title: DocumentDb query with DateTime
body: <p>I have object: (it's only part!)</p>
  
  <pre><code>class Flyer { public DateTime? ValidTo {get;set;} }
  </code></pre>
  
  <p>And in DocumentDb it looks this way:</p>
  
  <pre><code>"ValidTo": "2016-11-05T22:59:00Z"
  </code></pre>
  
  <p>And if in C# backend I doing this:</p>
  
  <pre><code>var query = Client.CreateDocumentQuery&lt;FlyerDocument&gt;(
                  UriFactory.CreateDocumentCollectionUri(DatabaseName, CollectionName))
                  .Where(
                      doc =&gt;
                          doc.Type == DocumentType.Flyer &amp;&amp;
                          doc.Entity.ValidTo != null &amp;&amp; doc.Entity.ValidTo &gt;= DateTime.UtcNow.AddDays(-7))
                  .AsDocumentQuery();
  
              var results = new List&lt;FlyerDocument&gt;();
              while (query.HasMoreResults)
              {
                  results.AddRange(await query.ExecuteNextAsync&lt;FlyerDocument&gt;());
              }
  </code></pre>
  
  <p>And it 
  <code>doc.Entity.ValidTo &gt;= DateTime.UtcNow.AddDays(-7)</code>
  throws <code>InvalidOperationException</code></p>
  
  <p>How to overcome it? </p>
  
  <p>@EDIT:
  Exception message is <code>nullable object must have a value</code>
  @EDIT 2:
  There are some documents in DB that do not have this field. </p>