Generally speaking, the sensors: mass air flow sensor, both oxygen sensors, manifold absolute pressure sensor, throttle position sensor, etc... can have a significant effect on how your car idles. But, unless your car is setting a check engine light code specifically pertaining to a single sensor, you should check everything you can.
Sometimes these stalling problems can be caused by a bad crankshaft position sensor, Typically there are more obvious signs if this is indeed the problem: i.e. a whacked out RPM gauge.
The throttle position sensor is mounted on the throttle body, as is the idle air control valve. If you think the throttle body area presents a problem, make sure the i.a.c. valve can operate without being completely clogged with carbon, like mine was. It cannot 'control idle air' if it can't move. Better yet, clean the entire throttle body.
Stalling may be caused by a compromised fuel delivery system. Rusted fuel lines, clogged fuel filters, bad fuel pressure regulator etc...
If you really believe you have a problem solely with the EGR valve, swap it out and install a new EGR valve gasket. Consider all angles on this one.