use is-type-of to do type check
Merge pull request #11 from dead-horse/use-is-type-of

use is-type-of to do type check