code: public JSType build() {
      if (result == null) {
        result = reduceAlternatesWithoutUnion();
        if (result == null) {
          result = new UnionType(registry, ImmutableList.copyOf(getAlternates()));
        }
      }
      return result;
    }
docs: Creates a union.
  @return A UnionType if it has two or more alternates, the
  only alternate if it has one and otherwise {@code NO_TYPE}.