title: Swift 2.0 fatal error: unexpectedly found nil while unwrapping an Optional value (lldb)
body: <pre><code>let imgURL:NSURL = NSURL(string: "\(ImageName)")!
  </code></pre>
  
  <p>at the above line,i'm getting fatal error</p>
  
  <blockquote>
    <p>fatal error: unexpectedly found nil while unwrapping an Optional value
    (lldb) </p>
  </blockquote>
  
  <p>Code : </p>
  
  <pre><code>let ImageName = obj["image"] as! String
  
   let imgURL:NSURL = NSURL(string: "\(ImageName)")!
   let request: NSURLRequest = NSURLRequest(URL: imgURL)
  
    let session = NSURLSession.sharedSession()
  
    let Imgtask = session.dataTaskWithRequest(request){
                              (data, response, error) -&gt; Void in
  
     if (error == nil &amp;&amp; data != nil)
      {
         func display_image()
         {
             pointAnnoation.DisplayImage = UIImage(data: data!)
          }
          dispatch_async(dispatch_get_main_queue(), display_image)
       }
  
     }
  
     Imgtask.resume()
  </code></pre>
  
  <p>From the above code im trying to store my image from database in annotation</p>
  
  <p>if i printed the 'ImageName' it returns the name from the database correctly, but unable to retain the image</p>
  
  <p>it resulting in the error while running.</p>