[PATCH AUTOSEL 5.10 30/39] thermal/core: Add NULL pointer check before using cooling device stats