Help Please with Altima!

I have a 2004 Altima. For the past few weeks, when I start it will act like it is about to stall. I will press on the gas to try to “clear” it out, but it doesn’t work. This doesn’t happen all the time, just every once in a while. Now, after I got home from work the day before last it would turn over when I started it, but it wouldn’t start - it was like gas wasn’t able to get to the engine. This happened again after running some errands and I got stuck picking my son up from baseball.
I took it to the mechanic who said he couldn’t find anything wrong, as it wasn’t causing any problems when he started it.
I am taking it to a different mechanic on Monday, but if anyone has any thoughts on what it might be, I would appreciate it.

Check fuel pressure
Check spark
Check for current/stored fault codes
Was the tank nearly empty when it acted up?
How many miles?
What engine?

It’s possible you just have a dirty throttle body or a bad IAC idle air control valve.

Try cleaning the throttle body yourself before getting too much into it first. Throttle body cleaner is probably $5/can and it’ll take you just a few minutes.

How old is that fuel filter?

Is all the owner manual suggested routine maintenance up to date? If not, that would be a good place to start. Best of luck.

Fuel filter…
That would be my first look…

I would bet intermittent fuel pump. You could squirt starter fluid in it next time it dies and see if it starts. That would tell you it’s a fuel problem.