Fixed an issue with DNS checking of nil and invalid domains