Improving validation of sensor value