Modified type() to return __type metatable field if it exists