Depends on whether you can tolerate a short period of pumping some air (few seconds) and other factors, eg what sensors you have access to.
The most straightforward is to measure the current/power consumed by the pump. Water is heavier than air and thus will impose more load.
You did not state how far up is the pumping distance.
Assuming the height is sufficient, you should be able to detect a measureable difference between pumping water/air by either an in-line current sensor or just the voltage on the pump (if the difference is big enough).
When a motor is free running, it draws very little current and so its back-EMF is almost equal to the supply voltage. When the load is heavy, the motor slows down and its back-EMF drops. This creates a voltage drop across both the pump internal resistance/impedance as well as the resistance/impedance of the power supply. If the power supply is a simple one with no regulation, you may experience significant enough voltage swing to just detect the voltage at the pump terminals.
For example, lets say both the pump and power supply have equal internal resistance of 10 ohms. And the power supply ideal voltage source is 12V. When the motor is free running, insignificant current flows so the voltage at the motor terminals will be close to 12V. When the pump is loaded, let say the speed drop significantly so the back-EMF is now 10V. The 2V voltage drop will be sl=plit equally between both internal resistance and you should see 11V at the motor terminals!
In other wards, just put a voltmeter on the terminals and record voltage readings when pump is pumping water/air. If you can see significant diiference in voltages, you can use the voltage method. If not, plug in an amp meter instead and repeat experiment. If the amp meter shows detectable changes, use a current sensor.