Check for null when getting temperature