     /// Deletes the value associated with the specified key, if any.
     ///
     /// - Parameter key: The key.
-    public func clear<T>(key: Key<T>) {
+    public func clear<ValueType>(key: Key<ValueType>) {
         self.userDefaults.set(nil, forKey: key._key)
         self.userDefaults.synchronize()
     }

    ///
    /// - Parameter type: The type
    /// - Returns: A boolean value indicating if the type is primitive
    private func isPrimitive<T>(type: T.Type) -> Bool {
        switch type {
        case is String.Type, is Bool.Type, is Int.Type, is Float.Type, is Double.Type:
            return true

    ///
    /// - Parameter key: The key.
    /// - Returns: The specified key type T or nil if not found.
    public func get<ValueType>(for key: Key<ValueType>) -> ValueType? {
        if isPrimitive(type: ValueType.self) {
            return self.userDefaults.value(forKey: key._key) as? ValueType
        }
        
        guard let data = self.userDefaults.data(forKey: key._key) else {
