boolean (PsiElement element) { if (!(element instanceof PsiPolyadicExpression expression)) { return false; } final IElementType tokenType = expression.getOperationTokenType(); if (!tokenType.equals(JavaTokenType.ANDAND) && !tokenType.equals(JavaTokenType.OROR)) { return false; } return !PsiUtilCore.hasErrorElementChild(expression); }