Refactor typeof checks to use underscore type fncs