code: public static boolean isSubtype(@Nonnull TypeMirror type, @Nonnull List<? extends TypeMirror> superTypes,
          @Nonnull Types typeEnvironment) {
  
          List<TypeMirror> typeSuperTypes = getAllSuperTypes(typeEnvironment, type);
          typeSuperTypes.add(0, type);
  
          for (TypeMirror t : typeSuperTypes) {
              String oldi = toUniqueString(t);
              for (TypeMirror i : superTypes) {
                  String newi = toUniqueString(i);
                  if (oldi.equals(newi)) {
                      return true;
                  }
              }
          }
  
          return false;
      }
docs: Checks whether given type is a sub type or is equal to one of the provided types.
  Note that this does not require the type to come from the same type "environment"
  or compilation as the super types.
  
  @param type            the type to check
  @param superTypes      the list of supposed super types
  @param typeEnvironment the environment in which the type lives
  
  @return true if type a sub type of one of the provided super types, false otherwise.