                 dispatch_async(dispatch_get_global_queue(priority, 0), {
                     let (responseObject: AnyObject?, error: NSError?) = serializer(self.request, self.response, self.delegate.data, self.delegate.error)
 
-                    dispatch_async(queue ? queue : dispatch_get_main_queue(), {
+                    dispatch_async((queue != nil) ? queue : dispatch_get_main_queue(), {
                         completionHandler(self.request, self.response, responseObject, error)
                     })
                 })

        // MARK: NSURLSessionDownloadDelegate

        func URLSession(session: NSURLSession!, downloadTask: NSURLSessionDownloadTask!, didFinishDownloadingToURL location: NSURL!) {
            if self.downloadTaskDidFinishDownloadingToURL {
                let destination = self.downloadTaskDidFinishDownloadingToURL!(session, downloadTask, location)
                var fileManagerError: NSError?


    class func JSONResponseSerializer(options: NSJSONReadingOptions = .AllowFragments) -> (NSURLRequest, NSHTTPURLResponse?, NSData?, NSError?) -> (AnyObject?, NSError?) {
        return { (request, response, data, error) in
            var serializationError: NSError?
            let JSON: AnyObject! = NSJSONSerialization.JSONObjectWithData(data, options: options, error: &serializationError)
            return (JSON, serializationError)
        }
    }
