void (@NotNull PsiMethodReferenceExpression expression) { checkMethodReference(expression, holder); JavaResolveResult result = expression.advancedResolve(false); PsiElement target = result.getElement(); if (target instanceof PsiMethod) { checkCollectionNullityOnAssignment(expression, LambdaUtil.getFunctionalInterfaceReturnType(expression), result.getSubstitutor().substitute(((PsiMethod)target).getReturnType())); } }