boolean (PsiExpression expression1, PsiExpression expression2) { if (!(expression1 instanceof PsiLiteralExpression) || expression2 == null) { return false; } final String text = expression1.getText(); if (PsiKeyword.NULL.equals(text)) { return true; } if (!PsiKeyword.TRUE.equals(text) && !PsiKeyword.FALSE.equals(text)) { return false; } final PsiType type = expression2.getType(); return PsiTypes.booleanType().equals(type); }