boolean (PsiElement element, @NotNull PsiReferenceExpression optionalRef) { PsiMethodCallExpression call = ObjectUtils.tryCast(element, PsiMethodCallExpression.class); if (!OptionalUtil.JDK_OPTIONAL_GET.matches(call)) return false; PsiExpression qualifier = ExpressionUtils.getEffectiveQualifier(call.getMethodExpression()); return qualifier != null && areElementsEquivalent(qualifier, optionalRef); }