Got invalid value from MAX6675Sensor

Is there a way to create an action when I disconnect my probe from MAX6675? ESPOHome shows it as:
Got invalid value from MAX6675Sensor

How can I code something like: if Sensor = invalid value from MAX6675Sensor then …