Fixed the null pointer issue when user location is null