// Another option is typeof which return a string if (typeof(val) === 'number') { // Guess what, it's a bloody number! }