Prevent NULL pointer fault when domain name cannot be resolved into an IP address