code: static <V> V safeGet(Map<?, V> map, @Nullable Object key) {
      checkNotNull(map);
      try {
        return map.get(key);
      } catch (ClassCastException | NullPointerException e) {
        return null;
      }
    }
docs: Delegates to {@link Map#get}. Returns {@code null} on {@code ClassCastException} and {@code
  NullPointerException}.