Previous implementation of Valid Number has a potential bug.