         return true
     }
 
-    public func equals(rhs: MixpanelType?) -> Bool {
-        arrayEquals(lhs: self as! [MixpanelType], rhs: rhs)
-    }
-}
-
-func arrayEquals(lhs: [MixpanelType], rhs: MixpanelType) -> Bool {
-    if rhs is [MixpanelType] {
-        let rhs = rhs as! [MixpanelType]
-        
-        if lhs.count != rhs.count {
-            return false
-        }
-
-        if !lhs.isValidNestedTypeAndValue() {
-            return false
-        }
-        
-        for (i, val) in lhs.enumerated() {
-            if !val.equals(rhs: rhs[i]) {
-                return false
-            }
-        }
-        return true
-    }
-    return false
+    public func equals(rhs: MixpanelType) -> Bool {
+        if rhs is [MixpanelType] {
+            let rhs = rhs as! [MixpanelType]
+            
+            if self.count != rhs.count {
+                return false
+            }
+
+            if !isValidNestedTypeAndValue() {
+                return false
+            }
+            
+            let lhs = self as! [MixpanelType]
+            for (i, val) in lhs.enumerated() {
+                if !val.equals(rhs: rhs[i]) {
+                    return false
+                }
+            }
+            return true
+        }
+        return false
+    }
 }
 
 extension Dictionary: MixpanelType {

     */
    public func isValidNestedTypeAndValue() -> Bool { return true }

    public func equals(rhs: MixpanelType?) -> Bool {
        if rhs is NSString {
            return self == rhs as! NSString
        }

        return true
    }
    
    public func equals(rhs: MixpanelType) -> Bool {
        if rhs is [String: MixpanelType] {
            let rhs = rhs as! [String: MixpanelType]
            
            if self.keys.count != rhs.keys.count {
                return false
            }
            
            if !isValidNestedTypeAndValue() {
                return false
            }
            
            for (key, val) in self as! [String: MixpanelType] {
                guard let rVal = rhs[key] else {
                    return false
                }

                if !val.equals(rhs: rVal) {
                    return false
                }
            }
            return true
        }
        return false
    }
}

func assertPropertyTypes(_ properties: Properties?) {
