title: fatal error: unexpectedly found nil while unwrapping an Optional value while using Swift
body: <p>I'm trying to implement <code>UICollectionView</code> in Swift.</p>
  
  <p>I have a problem regarding to optional value in line <code>let array = objects.objectForKey("image_url") as [String]</code></p>
  
  <p>I don't know what's wrong on this my code.</p>
  
  <p><strong>ViewController.swift</strong></p>
  
  <pre><code>import UIKit
  
  var data: [String] = [] ;
  
  class ViewController: UICollectionViewController{
  
  override func viewDidLoad() {
      super.viewDidLoad()
  
      var collectionView: UICollectionView
  
      let json = "https://api.photozou.jp/rest/search_public.json?keyword=bike"//"http://dl.dropboxusercontent.com/u/7817937/nameko.json"
      let uri = NSURL(string: json)
      let uridata = NSData(contentsOfURL: uri)
      let objects = uridata.objectFromJSONData() as NSDictionary
      let array = objects.objectForKey("image_url") as [String]
      data += array
  
      //println(array)
  
  
  
  }
  
  override func numberOfSectionsInCollectionView(collectionView: UICollectionView?) -&gt; Int {
      return 1
  }
  
  override func collectionView(collectionView: UICollectionView?, numberOfItemsInSection section: Int) -&gt; Int {
      return data.count
  }
  
  override func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -&gt; UICollectionViewCell {
      var cell = collectionView.dequeueReusableCellWithReuseIdentifier("cell", forIndexPath: indexPath) as CollectionViewCell
      let url = NSURL(string: data[indexPath.row])
      cell.image.setImageWithURL(url, placeholderImage: nil)
  
      return cell
  }
  
  override func didReceiveMemoryWarning() {
      super.didReceiveMemoryWarning()
      // Dispose of any resources that can be recreated.
  }
  }
  </code></pre>
  
  <p>Does anyone have solution about this error?</p>