Swift 3 - Cannot convert value of type Date? to type 'NSDate' in coercion
<p>I have a global <code>optional</code> <code>CLLocation</code> variable as follows:</p>

<pre><code>var location : CLLocation? = nil
</code></pre>

<p>I want to unwrap and convert the <code>timestamp</code> of the location to <code>NSDate</code>. </p>

<pre><code>location?.timestamp as NSDate
</code></pre>

<p>I get the following error</p>

<blockquote>
  <p>Cannot convert value of type Date? to type 'NSDate' in coercion.</p>
</blockquote>

<p>How do I resolve this?</p>

<p>PS: I am a newbie to Swift 3.</p>