     ///
     /// - Parameter key: The key.
     /// - Returns: The specified key type T or nil if not found.
-    public func get<T: Codable>(for key: Key<T>) -> T? {
-        if isPrimitive(type: T.self) {
-            return self.userDefaults.value(forKey: key._key) as? T
+    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 {


import Foundation

/// Class wrapper for static user defaults keys. Extend this class to specify
/// custom keys. e.g.
///
///     static let someKey = Key<T>("someKey")
public class Keys {
    fileprivate init() {}
}

public final class Key<ValueType>: Keys {
    fileprivate let _key: String
    public init(_ key: String) {
        self._key = key
        super.init()
    }
}


    /// - Parameters:
    ///   - some: The value to set.
    ///   - key: The associated `Key`.
    public func set<ValueType>(_ some: ValueType, for key: Key<ValueType>) {
        if isPrimitive(type: ValueType.self) {
            self.userDefaults.set(some, forKey: key._key)
            return
        }
