private static boolean isJavaTypeElement(@NotNull PsiElement element) {
      return element instanceof PsiTypeElement &&
             element.getLanguage().is(JavaLanguage.INSTANCE);
    }
private static boolean isJavaTypeElement(@NotNull PsiElement element)