Swift 3 - Cannot call value of non-function type '(response: Any, error Any)'
<p>I have written the following method in Swift 3</p>

<pre><code>func postFormData(url : String, parameters: Parameters!, headers : HTTPHeaders!, completionHandler : (response : Any,  error: Any)) {

    Alamofire.request(url, method : .post, parameters: parameters, headers: headers)
        .responseJSON { response in

            if let status = response.response?.statusCode {
                switch(status)
                {
                    let data = result as! NSDictionary
                    case 200:
                        if let result = response.result.value {
                            completionHandler(data)
                        }
                    default:
                        completionHandler(nil, data)
                }
            }
    }

}
</code></pre>

<ol>
<li>I get an error at <code>completionHandler(data)</code> stating <code>Cannot call value of non-function type '(response: Any, error Any)'</code></li>
<li>Is writing <code>completionHandler(nil, data)</code> to handle errors the best practice? </li>
</ol>

<p>PS : I am new to <code>iOS</code> and <code>Swift 3</code></p>