can a tld contain a number?
Conceptually, there is nothing that disallows numbers in a TLD and in the future, who knows, perhaps there will be numeric TLDs. There are no TLDs at the moment that do have numbers in them - the function probably does not test against a list of known TLDs (as it is subject to change), but lexically.