Status: IN
The hyphen validation in `is_valid` checks `i == 0 or i == len(token) - 1` and returns `False` before accessing `token[i-1]` or `token[i+1]`, guaranteeing no `IndexError`
Source: entries/2026/06/06/number-of-valid-words-in-a-sentence-solution.md