     
     func parseCloudConfigFromData(data: NSData?, completion: ThrowJSONWithInnerBlock) {
         guard let configData = data
-            else { completion(json: { throw CloudConfig.Error.BadResponse }); return }
+            else { completion(json: { throw CloudConfig.Error.NoData }); return }
         
         do {
             let json = try NSJSONSerialization.JSONObjectWithData(configData, options: .AllowFragments)
-            if let config = json as? [String : AnyObject] {
-                completion(json: { return config })
-            } else {
-                completion(json: { throw CloudConfig.Error.BadResponse })
-            }
+            guard let config = json as? [String : AnyObject]
+                else { completion(json: { throw CloudConfig.Error.BadData }); return }
+            completion(json: { return config })
         } catch {
             completion(json: { throw error })
         }

            let httpResponse = response as! NSHTTPURLResponse
            let statusCode = httpResponse.statusCode
            
            if statusCode == 200 {
                self.parseCloudConfigFromData(data, completion: completion)
            } else {
                completion(json: { throw CloudConfig.Error.BadResponse })
            }
        }
        
        task.resume()

    
    /// Errors types which can be throwed when refreshing local settings from remote.
    public enum Error: ErrorType {
        /// Property `remoteConfigURL` is not set on launch.
        case BadURL
        /// Server returned response code other then 200 OK.
        case BadResponseCode
        /// Server returned no data.
        case NoData
        /// Server returned data in unsupported format.
        case BadData
    }
    
    /// Constants for keys of sent NSNotification objects.
