code: private static boolean hasUnknownOrEmptySupertype(FunctionType ctor) {
      checkArgument(ctor.isConstructor() || ctor.isInterface());
      checkArgument(!ctor.isUnknownType());
  
      // The type system should notice inheritance cycles on its own
      // and break the cycle.
      while (true) {
        ObjectType maybeSuperInstanceType =
            ctor.getPrototype().getImplicitPrototype();
        if (maybeSuperInstanceType == null) {
          return false;
        }
        if (maybeSuperInstanceType.isUnknownType()
            || maybeSuperInstanceType.isEmptyType()) {
          return true;
        }
        ctor = maybeSuperInstanceType.getConstructor();
        if (ctor == null) {
          return false;
        }
        checkState(ctor.isConstructor() || ctor.isInterface());
      }
    }
docs: Given a constructor or an interface type, find out whether the unknown
  type is a supertype of the current type.