boolean (GrStatement expression) { if (!(expression instanceof GrAssignmentExpression assignment)) { return false; } final GrExpression rhs = assignment.getRValue(); if (rhs == null) { return false; } if (rhs instanceof GrLiteral) { return false; } final PsiType assignmentType = rhs.getType(); if (assignmentType == null) { return false; } return assignmentType.equals(PsiTypes.booleanType()) || assignmentType.equalsToText("java.lang.Boolean"); }