public static boolean isRawType(@Nullable PsiType type, @NotNull PsiSubstitutor substitutor) {
    if (type instanceof PsiClassType) {
      final PsiClass returnClass = ((PsiClassType)type).resolve();
      if (returnClass instanceof PsiTypeParameter typeParameter) {
        return substitutor.substitute(typeParameter) == null;
      }
    }
    return false;
  }
public static boolean isRawType(@Nullable PsiType type, @NotNull PsiSubstitutor substitutor)