Yes there is such a sensor. It's located where the bell housing bolts on to the engine block. 87 i think is the first year these sensors were introduced in the YJ's.
I doubt its the crank sensor; you did say you have spark?? Crank sensor bad=no spark
Are your plugs wet with fuel (meaning possible weak spark> coil???)