checking sensor for value