rewrite stringIsInteger stringIsNumber function