more error checking in geoip