Move token check into param to exec_lowstate and out of function body