private static @Nullable PsiType toRaw(@Nullable PsiType type) {
    return type instanceof PsiClassType ? ((PsiClassType)type).rawType() : type;
  }
private static @Nullable PsiType toRaw(@Nullable PsiType type)