             }
 
             switch newValue.data {
-            case .assignment(let valueObj as AnyObject):
+            case .assignment(let valueObj):
                 let newData: Value
                 if valueObj is NSNull && (newValue.type.canNullable || child.type.canNothing) {
                     newData = .null


        switch type {
        case .array(let def), .arrayOrNull(let def), .arrayOrNothing(let def):
            for ele in array as [AnyObject] {
                let val: Value
                if let item = Value(type: def, value: ele) {
                    val = item

            }
        }

        init?(type: ValueType, value: Any) {
            if type.canNullable && value is NSNull {
                self = .null
                return
