title: unexpectedly found nil while wrapping in swift
body: <p>i am getting this error </p>
  
  <blockquote>
    <p>Fatal error: Unexpectedly found nil while unwrapping an Optional value</p>
  </blockquote>
  
  <p>this is my code where i get the error.</p>
  
  <pre><code>if (method == .POST) {
              Alamofire.request(uri, method: .post, parameters: params, encoding: JSONEncoding.default).responseJSON { response in
  
                      switch response.result
                      {
                      case .success(let value):
  //                        let json = JSON(value)
  
                           let SDNetworkResponseValue =
                              self.prepareResponseObject(success: response.result.isSuccess, withData: value as Any, andError: ((response.result.error! as NSError)))
                          completionHandler(SDNetworkResponseValue)
  
                      case .failure(let error):
                          let SDNetworkResponseValue = self.prepareResponseObject(success: response.result.isSuccess, withData: response.result.value as Any , andError: (error as NSError))
                          completionHandler(SDNetworkResponseValue)
  
  
                  }
              }
          }
  </code></pre>