ensure against invalid/missing token