private @Nullable PsiCall replaceWithCast(PsiExpression[] expressions, @NotNull PsiCall origCall, Map.Entry<Integer, PsiType> entry,
                                            boolean shouldCopy) {
    Integer i = entry.getKey();
    PsiType parameterType = entry.getValue();
    PsiExpression modifiedExpression = getModifiedArgument(expressions[i], parameterType);
    if (modifiedExpression == null) return null;
    PsiExpressionList argumentList = origCall.getArgumentList();
    if (argumentList == null) return null;
    PsiCall newCall = shouldCopy ? LambdaUtil.copyTopLevelCall(origCall) : origCall;
    if (newCall == null) return null;
    Objects.requireNonNull(newCall.getArgumentList()).getExpressions()[i].replace(modifiedExpression);
    return newCall;
  }
private @Nullable PsiCall replaceWithCast(PsiExpression[] expressions, @NotNull PsiCall origCall, Map.Entry<Integer, PsiType> entry,
                                            boolean shouldCopy)