In my opinion the variant of the function with a default value should return that default value when the map does not exist.
More like treating a 'null' like an empty map instead of throwing an exception

That would simplify some flows because no check is needed if the map variable actually exists.
Using "mapVar = addMapEntry(mapVar, 'key', value)" should also work without exception when mapVar is null or does not yet exist.