change type to typeOf

to be a little more inline with `typeof` I decided to use `typeOf`, the difference is the `O` is capitalised, and native `typeof` is NOT.