use is-type-of to do type check