Trouble with stalling

I have a 2002 Chevy Blazer 2 door, 4.3lt engine. It has been stalling out on me, and when it stalls the ignition won’t turn and I can’t get it out of park. I just had the fuel filter replaced, could it be the egr valve, or what do you think?