1997 Nissan King Cab pickup (4 cyl 5 speed) regularly but not always cuts off when slowing to a stop or for a turn. The truck is usually warm. It has new plugs, wires, filters, and cleaned injectors.
The Idle Air Control (IAC) valve controls idle speed. Perhaps you need a new one.