             var orgProperty = OrgProperty()
             
             let orgValues = property[PropertyIndex.Value.rawValue]
-            if orgValues.type == .String {
+            if let orgType = orgValues.type as? String {
                 orgProperty.value = [orgValues.stringValue]
             }
-            else if orgValues.type == .Array {
+            else if let orgType = orgValues.type as? Array<Any> {
                 for (_, value) in orgValues {
                     orgProperty.value.append(value.stringValue)
                 }

                    //print("\(index): \(component)")
                    var componentList = [String]()
                    
                    if component.type == .String {
                        componentList.append(component.string!)
                    }
                    else if component.type == .Array {
                        for c in component.array! {
                            componentList.append(c.string!)
                        }

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