@Contract("null, null -> null; !null, _ -> !null; _, !null -> !null")
  public static @Nullable IntSet intersect(@Nullable IntSet set1, @Nullable IntSet set2) {
    if (set1 == null) return set2;
    if (set2 == null) return set1;

    IntSet result = new IntOpenHashSet();
    if (set1.size() < set2.size()) {
      intersectTo(set1, set2, result);
    }
    else {
      intersectTo(set2, set1, result);
    }

    return result;
  }
@Contract("null, null -> null; !null, _ -> !null; _, !null -> !null")
  public static @Nullable IntSet intersect(@Nullable IntSet set1, @Nullable IntSet set2)