boolean (@Nullable PsiElement element) { if (element instanceof PyBoolLiteralExpression) { return true; } return element instanceof PyReferenceExpression && (PyNames.TRUE.equals(element.getText()) || PyNames.FALSE.equals(element.getText())); }