code: public static <K, V> Map<K, V> readNullableMap(ObjectDataInput in) throws IOException {
          boolean isNull = !in.readBoolean();
          if (isNull) {
              return null;
          }
          return readMap(in);
      }
docs: Reads a map written by {@link #writeNullableMap(Map, ObjectDataOutput)}. The map itself
  may be {@code null}. No guarantee is provided about the type of Map returned or its suitability
  to be used in a thread-safe manner.
  
  @param in            the {@code ObjectDataInput} input to read from
  @param <K>           type of key class
  @param <V>           type of value class
  @return              a {@code Map} containing the keys & values read from the input or {@code null}
  if the original serialized map was {@code null}
  @throws IOException  when an error occurs while reading from the input