Context (@NotNull Project project, @NotNull PsiMethodCallExpression call) { PsiExpression falseArg = getOrElseArgument(call, myType); if (!ExpressionUtils.isNullLiteral(falseArg)) return null; PsiLocalVariable returnVar = PsiTreeUtil.getParentOfType(call, PsiLocalVariable.class, true); if (returnVar == null) return null; PsiStatement nextStatement = tryCast(PsiTreeUtil.skipWhitespacesForward(returnVar.getParent()), PsiStatement.class); if (nextStatement == null) return null; PsiExpression defaultValue = extractConditionalDefaultValue(nextStatement, returnVar); boolean isSimple = ExpressionUtils.isSafelyRecomputableExpression(defaultValue); if (defaultValue == null || (!isSimple && !LambdaGenerationUtil.canBeUncheckedLambda(defaultValue))) return null; PsiType type = defaultValue.getType(); PsiType methodCallReturnValue = call.getMethodExpression().getType(); if (type == null || methodCallReturnValue == null || !methodCallReturnValue.isAssignableFrom(type)) return null; return new Context(call, defaultValue, nextStatement, isSimple); }