[javascript] How to check the value given is a positive or negative integer?