title: Swift: [__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[1]'
body: <p>I have a UITextView and I want to store this text in a NSDictionary.</p>
  
  <p>I have this piece of code:</p>
  
  <pre><code> var imageData = UIImageJPEGRepresentation(photoInfo["UIImagePickerControllerOriginalImage"] as UIImage, 100.0)
  
          var description = photoDesc.text
  
          println(description)
  
          var parameters: NSDictionary = ["user":"admin", "desc" : description, "image" : imageData]
  
          println(parameters)
  </code></pre>
  
  <p><strong>println()</strong> outputs "description" correctly, but my code crash in this line:  var parameters: <code>NSDictionary = ["user":"admin", "desc" : description, "image" : imageData]</code></p>
  
  <p>with this error:</p>
  
  <pre><code>[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[1]'
  </code></pre>
  
  <p>If I remove "desc" key from NSDictionary, I don't get any error.</p>
  
  <p>Any idea ?</p>
  
  <p><strong>SOLVED:</strong></p>
  
  <pre><code>var description: String = photoDesc.text
  </code></pre>