[javascript] How to check if a variable is an integer in JavaScript?