Fix typeof() for numbers

fixes #8028
Implement more unit tests for typeof()

refs #8028