 
 
 public extension ConfigManager {
-    public subscript(key: ConfigManagerKey<Any?>) -> Any? {
-        get { return self[key.keyPath] ?? key.defaultValue }
-    }
-    
-    public subscript(key: ConfigManagerKey<String?>) -> String? {
-        get { return self[key.keyPath] as? String ?? key.defaultValue }
+    public subscript<T>(key: ConfigManagerKey<T>) -> T {
+        get { return self[key.keyPath] as? T ?? key.defaultValue }
+    }
+
+    public subscript<T: ExpressibleByNilLiteral>(key: ConfigManagerKey<T>) -> T {
+        get { return self[key.keyPath] as? T ?? key.defaultValue }
     }
     
     public subscript(key: ConfigManagerKey<URL?>) -> URL? {

        
        // Now we inject the environment into the path.
        let fileExtension = defaultUrlPath.pathExtension
        var envSpecificFilePath = defaultUrlPath.deletingPathExtension()
        envSpecificFilePath = envSpecificFilePath.appendingPathExtension(env)
        envSpecificFilePath = envSpecificFilePath.appendingPathExtension(fileExtension)

        // Insert at index 1 because the private config file overrides
        paths.insert(envSpecificFilePath, at: 1)

            return URL(string: rawValue)
        }
    }

    public subscript(key: ConfigManagerKey<URL>) -> URL {
        get {
            guard let rawValue = self[key.keyPath] as? String else {
                return key.defaultValue
            }

            return URL(string: rawValue)!
        }
    }
}
