Fixes in typeOf (after unit test fail)