         }
         
         if let date = value as? WrappableDate {
-            return self.wrap(date: date) as AnyObject
+            return self.wrap(date: date)
         }
         
         let mirror = Mirror(reflecting: value)

/// Extension providing a default wrapping implementation for `RawRepresentable` Enums
public extension WrappableEnum where Self: RawRepresentable {
    public func wrap(context: Any?, dateFormatter: DateFormatter?) -> Any? {
        return self.rawValue as AnyObject
    }
}


    
    func wrap<T>(object: T, writingOptions: JSONSerialization.WritingOptions) throws -> Data {
        let dictionary = try self.wrap(object: object, enableCustomizedWrapping: true)
        return try JSONSerialization.data(withJSONObject: dictionary, options: writingOptions)
    }
    
    func wrap<T>(value: T, propertyName: String? = nil) throws -> Any {
