private static CallHandler<ReplaceCollectorFix> returnTypeMatcher(CallHandler<ReplaceCollectorFix> orig) {
      return new CallHandler<>(orig.matcher(), call -> {
        PsiMethodCallExpression collectCall = PsiTreeUtil.getParentOfType(call, PsiMethodCallExpression.class);
        if (collectCall == null) return null;
        PsiExpression qualifier = collectCall.getMethodExpression().getQualifierExpression();
        if (qualifier == null) return null;
        PsiType streamElementType = PsiUtil.substituteTypeParameter(qualifier.getType(), CommonClassNames.JAVA_UTIL_STREAM_STREAM, 0, false);
        PsiType optionalElementType = PsiUtil.substituteTypeParameter(collectCall.getType(), JAVA_UTIL_OPTIONAL, 0, false);
        if (streamElementType == null || !streamElementType.equals(optionalElementType)) return null;
        return orig.apply(call);
      });
    }
private static CallHandler<ReplaceCollectorFix> returnTypeMatcher(CallHandler<ReplaceCollectorFix> orig)