Downcast from 'String?' to 'String' only unwraps optionals
<p>I am trying to read a <code>.mid</code> file from the <code>DocumentDirectory</code>. I tried this: </p>

<pre><code>var path = NSSearchPathForDirectoriesInDomains(.DocumentDirectory, .UserDomainMask, true).first as! String
var midiFileURL = NSURL.fileURLWithPath(path)
</code></pre>

<p>The problem is: </p>

<blockquote>
  <p>Downcast from 'String?' to 'String' only unwraps optionals; did you mean to use '!'?</p>
</blockquote>

<p>Once I read the file from the <code>DocumentsDirectory</code> I want to be able to play it back with this: </p>

<pre><code>guard let bankURL = NSBundle.mainBundle().URLForResource("gs_instruments", withExtension: "dls") else {
    fatalError("\"gs_instruments.dls\" file not found.")
}

do {
    try self.midiPlayer = AVMIDIPlayer(contentsOfURL: midiFileURL, soundBankURL: bankURL)
    print("created midi player with sound bank url \(bankURL)")
} catch let error as NSError {
    print("Error \(error.localizedDescription)")
}

self.midiPlayer.prepareToPlay()

self.midiPlayer.play({
    print("midi done")
}) 
</code></pre>

<p><em>How do I fix the error? Many thanks.</em></p>