Safely read a value from a map when the key may be null/undefined. Returns undefined for a nullish key (skipping the lookup) so callers can drop manual key != null guards before every map.get(...).
null
undefined
key != null
map.get(...)
Safely read a value from a map when the key may be
null/undefined. Returnsundefinedfor a nullish key (skipping the lookup) so callers can drop manualkey != nullguards before everymap.get(...).