Detecting a disconnected analog input
Add a pull down or pull up resistor on the A2D input - it will then always read full scale or zero when the sensor is disconnected.

A value of about 100K should do the trick, A2D input impedance is typically 1M ohm or so. and sensor output is typically less than 100 ohm.