Add pointee_type helper, and fix type error.