Check if token is valid