The shell and most of the userland unix tools are basically string oriented, there is no strong notion of a type. This is both an advantage and a problem, because most of the time you mess with strings anyway, and it's a shortcut. If you want to do something with numbers it's inconvenient.
Another method is to use an integer test on the variable. If it's not a number the test will fail with an error message. I don't like this method as much, because it's relying on a side effect (that the test will produce the error message). So it's more obscure.
$ test $num -eq $num
bash: test: s: integer expression expected