Converts a nullish Map to an empty Map
The type of Map keys
The type of Map values
Optional
The Map value to check (optional or null)
The original Map if it exists, otherwise an empty Map
Converts a nullish Map to an empty Map