title: Swift: Cannot subscript a value of type 'Dictionary<String, NSObject>?'
body: <p><strong>EDIT: Not a DUPLICATE:</strong></p>
  
  <p>That solution gives <code>'Could not find an overload for 'subscript' that accepts the supplied arguments'</code> error.  So, no this is NOT a duplicate. </p>
  
  <p>Here is the function declaration.  </p>
  
  <pre><code>        func auth(user: String, pass: String, completion: (returned: Bool, error: Bool, response: Dictionary&lt;String, NSObject&gt;?) -&gt; ()){
  </code></pre>
  
  <p><code>response</code> can be nil
  }</p>
  
  <p>Now I'm trying to access value passed back in another file and getting an error:</p>
  
  <pre><code>        if let labelString = response["error_description"] as! String?{
              self.labelPrompt.text = labelString
          }
  </code></pre>
  
  <p><strong>Error:</strong>  Cannot subscript a value of type 'Dictionary?' with an index of type 'String'</p>
  
  <p><a href="https://i.stack.imgur.com/2a8z6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2a8z6.png" alt="enter image description here"></a></p>