No, I haven't tested it... I just read the documentation I thought it might work. I am not sure why it does that, doesn't seem that useful, but there isn't an isInteger function.

So I guess your method is fine. Here are other methods if you want to check http://stackoverflow.com/questions/3885817/how-to-check-if-a-number-is-float-or-integer