Strictly detect whether a word is digit