public static @Nullable <K, V> Map<K, V> mergeMaps(@Nullable Map<K, V> first, @Nullable Map<K, V> second) {
    if (first == null || first.isEmpty()) return second;
    if (second == null) {
      return first;
    }
    var merged = new HashMap<K, V>(mapSize(second) + mapSize(first));
    merged.putAll(first);
    merged.putAll(second);
    return merged;
  }
public static @Nullable <K, V> Map<K, V> mergeMaps(@Nullable Map<K, V> first, @Nullable Map<K, V> second)