Add check for empty domain