That was a very sloppy copy & paste operation from http://stackoverflow.com/questions/1303646/check-whether-variable-is-number-or-string-in-javascript