test before rendering tokenUrl