Better code to check domain name