More null checks in loggings