     var parameters = [String: [String]]()
     
     for (parameterName, parameterValue) in JSONParameters {
-        if parameterValue.type == .String {
+        if let parameterType = parameterValue.type as? String {
             parameters[parameterName] = [parameterValue.stringValue]
         }
-        else if parameterValue.type == .Array {
+        else if let parameterType = parameterValue.type as? Array<Any> {
             var values = [String]()
             for (_, value) in parameterValue {
                 values.append(value.stringValue)

            var orgProperty = OrgProperty()
            
            let orgValues = property[PropertyIndex.Value.rawValue]
            if orgValues.type == .String {
                orgProperty.value = [orgValues.stringValue]
            }
            else if orgValues.type == .Array {
                for (_, value) in orgValues {
                    orgProperty.value.append(value.stringValue)
                }

                }
            }
            
            contactEmailAddresses.append(CNLabeledValue(label: label, value: email as! NSString))
        }
        
        contact.emailAddresses = contactEmailAddresses
