code: @NullSafe
    public static <K, V> Map<K, V> nullSafeMap(Map<K, V> map) {
      return (map != null ? map : Collections.emptyMap());
    }
docs: Returns the given {@link Map} if not null or an empty {@link Map}.
  
  @param <K> Class type of the key.
  @param <V> Class type of the value.
  @param map the {@link Map} to evaluate.
  @return the given {@link Map} if not null or an empty {@link Map} otherwise.
  @see java.util.Collections#emptyMap()
  @see java.util.Map