How to detect if a sensor is connected to a digital input

Trying to detect if a sensor (in my case a wind sensor) is connect to a specific digital input. In other my words I try to differenciate the two cases:

a) device has a wind sensor connected to a specific input pin
b) device has no wind sensor connected

Rudi