rescue from SocketError when getting address from hostname

IPSocket::getaddress throws a SocketError if the hostname
can't be resolved. Rescue and return nil if this occurs.