boolean (PsiExpression arg) { arg = skipParenthesizedExprDown(arg); if (FunctionalExpressionUtils.isFunctionalReferenceTo(arg, JAVA_LANG_BOOLEAN, PsiTypes.booleanType(), "booleanValue", PsiType.EMPTY_ARRAY) || FunctionalExpressionUtils.isFunctionalReferenceTo(arg, JAVA_LANG_BOOLEAN, null, "valueOf", PsiTypes.booleanType())) { return true; } return arg instanceof PsiLambdaExpression && LambdaUtil.isIdentityLambda((PsiLambdaExpression)arg); }