[PATCH AUTOSEL 4.19 18/20] thermal/core: Add NULL pointer check before using cooling device stats