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

If the pin with the 10K pullup also has a weak pulldown resistor to prevent the pin floating if there is nothing connected on it then setting the pin to input and reading the pin state should give low if no wind sensor connected and high if it is connected.
This all depends on how the wind sensor works as it might not always be high.