Use `safe_str_cmp` when evaluating tokens. Fixes #252