code: private Iterable<? extends JSType> getTypeAlternatives(JSType type) {
      if (type.isUnionType()) {
        return type.getUnionMembers();
      } else {
        ObjectType objType = type.toMaybeObjectType();
        FunctionType constructor = objType != null ? objType.getConstructor() : null;
        if (constructor != null && constructor.isInterface()) {
          List<JSType> list = new ArrayList<>();
          for (FunctionType impl : constructor.getDirectSubTypes()) {
            list.add(impl.getInstanceType());
          }
          return list.isEmpty() ? null : list;
        } else {
          return null;
        }
      }
    }
docs: Returns the alternatives if this is a type that represents multiple
  types, and null if not. Union and interface types can correspond to
  multiple other types.