On a new connection i get sometimes the error TypeError: Cannot read property 'country' of null
and mostly it works correct!
How do i avoid this whenever its null so i will not get the error?
Error line is var location = geo.country;
var ip = socket.ip //socket.ip;
var geo = geoip.lookup(ip);
var location = geo.country;
console.log(location);