title: Convert Swift Dictionary to NSDictionary
body: <p>I have created a Swift Dictionary object</p>
  
  <pre><code>var params = ["first_name": firstNameTextField.text,
                "last_name": lastNameTextField.text,
                "company": companyTextField.text,
                "email_address": emailTextField.text,
                "phone_number": phoneTextField.text]
  </code></pre>
  
  <p>Next, I have ObjC framework which I connected to my Swift app.
  There is an object inside with property</p>
  
  <pre><code>@property (nonatomic, retain) NSMutableDictionary *fields;
  </code></pre>
  
  <p>I'm trying to assign it this way</p>
  
  <pre><code>object.fields = params
  </code></pre>
  
  <p>And got an error:</p>
  
  <pre><code>Cannot convert the expression's type '()' to type 'NSMutableDictionary!'
  </code></pre>
  
  <p>I also tried to do it this way </p>
  
  <pre><code>var params = ["first_name": firstNameTextField.text,
                "last_name": lastNameTextField.text,
                "company": companyTextField.text,
                "email_address": emailTextField.text,
                "phone_number": pnoneTextField.text].mutableCopy() as NSMutableDictionary
  
  object.fields = params
  </code></pre>
  
  <p>It compiled well, but I got runtime error:</p>
  
  <pre><code>*** Terminating app due to uncaught exception 'NSInvalidArgumentException', 
  reason: '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: 
  attempt to insert nil object from objects[0]'
  </code></pre>
  
  <p>I have all my fields printed and they aren't nil:</p>
  
  <pre><code>println(firstNameTextField.text)
  println(lastNameTextField.text)
  println(companyTextField.text)
  println(emailTextField.text)
  println(pnoneTextField.text)
  
  ...
  
  1
  2
  3
  5
  4
  </code></pre>
  
  <p>Any ideas?</p>