Fix nil check on private ip address