Check for variable presence before blind assignment in Sensor.php, Room.php, and User.php.