Making SafeMap a generic type.