A better isTome check and a fix for browsers that choke on valueOf.