thermal: thermal_core: remove usage of IS_ERR_OR_NULL