Type asserts: Fix issues with TypeName and asserts

The assert functions we used for testing was wrong. It did not
handle number vs Number.

We also dropped the `moduleName` of the TypeName on the floor.