title: Unable to cast object of type 'System.DateTime' to type 'System.String'
body: <p>Getting an error that has me stumped. I'm assuming it's something simple but can't seem to figure this one out, this is the code that is causing the error:</p>
  
  <pre><code>if ((string) _nullableDateTimePicker1.Value != string.Empty &amp;&amp; _nullableDateTimePicker1.Value != null) {
       _nullableDateTimePicker1.Value = null;
  }
  </code></pre>
  
  <p>When clicking on the search button in my windows form, this is what I get popping up:</p>
  
  <blockquote>
    <p>Unable to cast object of type 'System.DateTime' to type 'System.String'.</p>
  </blockquote>