boolean (PsiExpression expression) { expression = PsiUtil.skipParenthesizedExprDown(expression); if (!(expression instanceof PsiClassObjectAccessExpression classObjectAccessExpression)) { return false; } final PsiTypeElement typeElement = classObjectAccessExpression.getOperand(); return !ignoreInstanceofOnLibraryClasses || !LibraryUtil.isTypeInLibrary(typeElement.getType()); }