                     let postStatusCode = (response as? NSHTTPURLResponse)?.statusCode
                     guard postStatusCode == 200 else {
                         let message = "HTTP error code returned for POST request."
-                        self.asynchronousError(function, message: message, code: postStatusCode!, completionHandler: completionHandler)
+                        self.asynchronousError(function, message: message, code: postStatusCode, completionHandler: completionHandler)
                         return
                     }
                     
                     // ensure response data is not nil
                     guard let data = data else {
                         let message = "Nil data returned for POST request."
-                        self.asynchronousError(function, message: message, code: postStatusCode!, completionHandler: completionHandler)
+                        self.asynchronousError(function, message: message, code: postStatusCode, completionHandler: completionHandler)
                         return
                     }
                     

    /**
    An abstraction of a common pattern for handling asynchronous errors.
    */
    private func asynchronousError(function: String, message: String, code: Int, completionHandler: (String?, NSError?) -> Void) {
        WatsonError("\(function): \(message)")
        let userInfo = [NSLocalizedDescriptionKey: message]
        let error = NSError(domain: "WatsonSpeechToText", code: code, userInfo: userInfo)
        completionHandler(nil, error)
    }
    
    /**

                        completionHandler(transcript, nil)
                    } catch let error {
                        let message = "Error parsing JSON: \(error)"
                        self.asynchronousError(function, message: message, code: postStatusCode, completionHandler: completionHandler)
                        return
                    }

