public static boolean isBooleanReturn(GrStatement statement) {
    if (!(statement instanceof GrReturnStatement returnStatement)) {
      return false;
    }
    final GrExpression returnValue = returnStatement.getReturnValue();
    if (returnValue == null) {
      return false;
    }
    if (returnValue instanceof GrLiteral) {
      return false;
    }
    final PsiType returnType = returnValue.getType();
    if (returnType == null) {
      return false;
    }
    return returnType.equals(PsiTypes.booleanType()) || returnType.equalsToText("java.lang.Boolean");
  }
public static boolean isBooleanReturn(GrStatement statement)