@Contract("null, _ -> false")
  public static boolean isDenotableType(@Nullable PsiType type, @NotNull PsiElement context) {
    if (type == null || type instanceof PsiWildcardType || type instanceof PsiCapturedWildcardType || type instanceof PsiIntersectionType) return false;
    type = type.getDeepComponentType();
    if (type instanceof PsiPrimitiveType) {
      return !PsiTypes.nullType().equals(type);
    }
    if (type instanceof PsiClassType) {
      String className = ((PsiClassType)type).getClassName();
      if (className == null) return false;
      LanguageLevel level = PsiUtil.getLanguageLevel(context);
      if (PsiUtil.isKeyword(className, level) || PsiUtil.isSoftKeyword(className, level)) return false;
      for (PsiType parameter : ((PsiClassType)type).getParameters()) {
        if (parameter instanceof PsiWildcardType) {
          parameter = ((PsiWildcardType)parameter).getBound();
        }
        if (parameter != null && !isDenotableType(parameter, context)) return false;
      }
      return true;
    }
    return false;
  }
@Contract("null, _ -> false")
  public static boolean isDenotableType(@Nullable PsiType type, @NotNull PsiElement context)