Issues with my hyundai santa fe

I have a 2004 Hyundai Santa Fe with about 83,000 miles. Lately it has been having issue with the rpm’s going low and stalling out while I’m driving. I’ve taken it to a mechanic and it has not been resolved. He said it does not need a tune up and it’s nothing with my fuel. I’ve also heard it could be a crank shaft censor but he says no. The check engine light has come on sometimes, very quickly but then goes off… He ran the code but nothing came up. So then what’s causing my car to do this?? While the car is running and I’m in park, the rpm’s will go from 2 to almost 0 then back up again. While I’m driving down the road it does the same thing and sometimes it completely stalls out while I’m going about 40mph. So incredibly scary. Can you please give me some suggestions on what this could be so I can take it back and get it fixed!!! I’m so scared to drive it but I have to get to work. Please help!!

Has your mechanic checked for vacuum leaks?
Has he verified that the Mass Air Flow sensor is operating correctly?

Have the idle air control valve (IAC) and the mass airflow sensor (MAF) checked. Either one of those can cause fluctuating rpm’s if not working properly.

Respectfully, I don’t think the IAC would cause the vehicle to stall at 40mph, although it could certainly cause a rough idle

To me, it sounds like a fuel delivery problem