 // MARK: - Helpers: Set
 
 extension PreferencesClient {
-    /// Returns a boolean value indicating whether the Preferences contains the
-    /// given key.
-    public func contains(_ key: Key) -> Bool {
-        get(key) != nil
-    }
-
     public func set<T>(_ key: Key, value: T?) {
         guard let value = value else {
-            set(key, value: nil)
-            return
+            return remove(key)
         }
 
         set(key, value: StringConverter(value)?.get())


    func set<T>(_ key: Key, value: T?)
    func contains(_ key: Key) -> Bool
}

// MARK: - Helpers: Get


    public func set<T>(_ key: Key, value: T?) where T: RawRepresentable, T.RawValue == String {
        set(key, value: value?.rawValue)
    }
}

// MARK: - Helpers

extension PreferencesClient {
    /// Returns a boolean value indicating whether the Preferences contains the
    /// given key.
    public func contains(_ key: Key) -> Bool {
        get(key) != nil
    }

    public func remove(_ key: Key) {
        set(key, value: nil)
    }
}

