PsiExpression (PsiMethodCallExpression call, OrElseType type) { if (type == OrElseType.OrElse) { return call.getArgumentList().getExpressions()[0]; } if (type == OrElseType.OrElseGet) { PsiLambdaExpression lambda = getLambda(call.getArgumentList().getExpressions()[0]); if (lambda == null || !lambda.getParameterList().isEmpty()) return null; return LambdaUtil.extractSingleExpressionFromBody(lambda.getBody()); } return null; }