private static @Nullable Problem doCheckMethodCallOnFunctionalExpression(@NotNull PsiElement expression,
                                                                           @NotNull Predicate<? super PsiMethodCallExpression> elementContainerPredicate) {
    if (!(PsiUtil.skipParenthesizedExprUp(expression.getParent()) instanceof PsiTypeCastExpression parent)) return null;
    final PsiType interfaceType = parent.getType();
    return doCheckMethodCallOnFunctionalExpression(elementContainerPredicate, parent, interfaceType,
                                                   expression instanceof PsiLambdaExpression ? new ReplaceWithLambdaBodyFix()
                                                                                             : new ReplaceWithMethodReferenceFix());
  }
private static @Nullable Problem doCheckMethodCallOnFunctionalExpression(@NotNull PsiElement expression,
                                                                           @NotNull Predicate<? super PsiMethodCallExpression> elementContainerPredicate)