That is how I would handle that - you lex or parse your strings into an Option<Token> (or Result, etc), so that then all logic operating on the Token enum doesnt need to worry about whether it's a correct value - it's statically enforced.
I personally find the most value out of sum types (enums with data) and the ability to use Option/Result with the try operator '?' for this kind of stuff, where you can float errors up the call chain