@Contract("null -> false")
  public static boolean isUnresolvedClassType(@Nullable PsiType psiType) {
    Deque<PsiType> stack = new ArrayDeque<>();
    if (psiType != null) {
      stack.push(psiType);
    }
    while (!stack.isEmpty()) {
      PsiType currentType = stack.pop();
      if (currentType instanceof PsiLambdaParameterType) {
        return true;
      }
      if (currentType instanceof PsiIntersectionType) {
        Collections.addAll(stack, ((PsiIntersectionType)currentType).getConjuncts());
      }
      if (currentType instanceof PsiDisjunctionType) {
        stack.addAll(((PsiDisjunctionType)currentType).getDisjunctions());
      }
      if (currentType instanceof PsiClassType) {
        PsiClass resolved = ((PsiClassType)currentType).resolve();
        if (resolved == null || !isHierarchyResolved(resolved)) {
          return true;
        }
      }
    }
    return false;
  }
@Contract("null -> false")
  public static boolean isUnresolvedClassType(@Nullable PsiType psiType)