improved sensor data sanity check