code: private static boolean requiresWrap(Map map) {
          for (Object value : map.values()) {
              if (value instanceof Collection || value instanceof Map || value instanceof Object[]) {
                  return true;
              }
          }
          return false;
      }
docs: Checks whether a map requires any wrapping. This is used to avoid creating a copy of a map
  if all of its fields can be handled natively.
  
  @param map The map to check for values that require wrapping.
  @return {@code true} if the map contains values that need to be wrapped (i.e. maps or
  collections), otherwise {@code false}.