improve the internal isNumericString function