private @Nullable Constrained withInstanceofValue(@NotNull Exact type) {
      if (myInstanceOf.contains(type)) return this;

      for (Exact notInst : myNotInstanceOf) {
        if (notInst.isAssignableFrom(type)) return null;
      }

      Set<Exact> newInstanceof = new HashSet<>(myInstanceOf);
      for (Exact alreadyInstanceof : myInstanceOf) {
        if (type.isAssignableFrom(alreadyInstanceof)) {
          return this;
        }
        if (!type.isConvertibleFrom(alreadyInstanceof)) {
          return null;
        }
        if (alreadyInstanceof.isAssignableFrom(type)) {
          newInstanceof.remove(alreadyInstanceof);
        }
      }
      newInstanceof.add(type);
      return new Constrained(newInstanceof, myNotInstanceOf);
    }
private @Nullable Constrained withInstanceofValue(@NotNull Exact type)