checking token type