Added token.type method