Yes, a '90 4.0 has a knock sensor. Looking up from the bottom, the knock sensor is on the driver side of the block. You'll see the wires going into it, kinda looks like an O2 sensor. As far as diagnosing a bad one, I don't know. I have the original one on my '90 with over 300k miles on it and it seems to be fine. The only time I noticed any excessive knock is coming back from Moab a couple weeks ago but I believe that was some bad gas as I haven't noticed it since filling up after. I've been getting the best gas mileage I've ever got and it's running great so I see no reason for a new one.