     }
 
     public func decodeNil() -> Bool {
-        return self.value.isEmpty
+        switch options.nilDecodingStrategy {
+        case .empty:
+            return self.value.isEmpty
+        case .custom(let customClosure):
+            return customClosure(self.value)
+        }
+        
     }
 
     public func decode(_ type: Bool.Type) throws -> Bool {

        /// Decode the `Data` as a custom value decoded by the given closure.
        case custom((_ value: String) throws -> Data)
    }

    /// The strategy to use in decoding bools. Defaults to `.default`.
    open var boolDecodingStrategy: BoolDecodingStrategy = .default


    /// The strategy to use in decoding binary data. Defaults to `.base64`.
    open var dataDecodingStrategy: DataDecodingStrategy = .base64
    
    /// The strategy to use in decoding nil data. Defaults to `.empty`.
    open var nilDecodingStrategy: NilDecodingStrategy = .empty

    /// Contextual user-provided information for use during decoding.
    open var userInfo: [CodingUserInfoKey: Any] = [:]
