title: Error: 'Cannot call value of non-function type' on Swift 3
body: <p>The second and third lines of the following code were working on swift 2.3 and since I updated to swift 3, I've been getting the error  <em>Cannot call value of non-function type 'Any?!'</em> for both of them:</p>
  
  <pre><code>let dic = try JSONSerialization.jsonObject(with: data!, options: JSONSerialization.ReadingOptions.mutableLeaves) as! NSDictionary                    
  
  let lat = ((((dic["results"] as AnyObject).value(forKey: "geometry") as AnyObject).value(forKey: "location") as AnyObject).value(forKey: "lat") as AnyObject).object(0) as! Double
  let lon = ((((dic["results"] as AnyObject).value(forKey: "geometry") as AnyObject).value(forKey: "location") as AnyObject).value(forKey: "lng") as AnyObject).object(0) as! Double
  
  self.delegate.locateWithLongitude(lon, andLatitude: lat, andTitle: self.searchResults[(indexPath as NSIndexPath).row])
  </code></pre>
  
  <p>This is the callback from a google maps search. </p>
  
  <p>The JSON that the method is reading is this:</p>
  
  <pre><code>{
     "results" : [
        {
           "address_components" : [
              {
                 "long_name" : "São Paulo",
                 "short_name" : "São Paulo",
                 "types" : [ "locality", "political" ]
              },
              {
                 "long_name" : "São Paulo",
                 "short_name" : "São Paulo",
                 "types" : [ "administrative_area_level_2", "political" ]
              },
              {
                 "long_name" : "State of São Paulo",
                 "short_name" : "SP",
                 "types" : [ "administrative_area_level_1", "political" ]
              },
              {
                 "long_name" : "Brazil",
                 "short_name" : "BR",
                 "types" : [ "country", "political" ]
              }
           ],
           "formatted_address" : "São Paulo, State of São Paulo, Brazil",
           "geometry" : {
              "bounds" : {
                 "northeast" : {
                    "lat" : -23.3566039,
                    "lng" : -46.36508449999999
                 },
                 "southwest" : {
                    "lat" : -24.0082209,
                    "lng" : -46.825514
                 }
              },
              "location" : {
                 "lat" : -23.5505199,
                 "lng" : -46.63330939999999
              },
              "location_type" : "APPROXIMATE",
              "viewport" : {
                 "northeast" : {
                    "lat" : -23.3566039,
                    "lng" : -46.36508449999999
                 },
                 "southwest" : {
                    "lat" : -24.0082209,
                    "lng" : -46.825514
                 }
              }
           },
           "partial_match" : true,
           "place_id" : "ChIJ0WGkg4FEzpQRrlsz_whLqZs",
           "types" : [ "locality", "political" ]
        }
     ],
     "status" : "OK"
  }
  </code></pre>
  
  <p>Does anyone knows what I have do change to make it work? </p>