Small improvement to validDomain