How to convert Any? to Data in swift : <p>I need to convert from type <code>Any?</code> to <code>Data</code>. </p>

<p>something like this</p>

<pre><code>func getItem(item:Any?) {
    let data = convertToData(item)
}
</code></pre>
