Context (@NotNull Project project, @NotNull PsiMethodCallExpression call) { PsiElement parent = PsiUtil.skipParenthesizedExprUp(call.getParent()); if (!(parent instanceof PsiExpressionList)) return null; PsiMethodCallExpression parentCall = tryCast(parent.getParent(), PsiMethodCallExpression.class); if (!myWrapper.test(parentCall)) return null; PsiExpression qualifier = call.getMethodExpression().getQualifierExpression(); if (qualifier == null || !EquivalenceChecker.getCanonicalPsiEquivalence().typesAreEquivalent(qualifier.getType(), parentCall.getType())) { return null; } String name = call.getMethodExpression().getReferenceName(); if ("get".equals(name)) { DfType dfType = SpecialField.OPTIONAL_VALUE.getFromQualifier(CommonDataflow.getDfType(qualifier)); if (dfType.isSuperType(DfTypes.NULL)) return null; } else if ("orElse".equals(name)) { if (!ExpressionUtils.isNullLiteral(call.getArgumentList().getExpressions()[0])) return null; } return new Context(qualifier, parentCall); }