Added `typeOf` method

Resolved #35