boolean (PsiElement element) { if (!(element instanceof PsiConditionalExpression conditionalExpression)) { return false; } final PsiType type = conditionalExpression.getType(); return PsiTypes.booleanType().equals(type); }