Detect invalid token error

Signed-off-by: Michal Čihař <michal@cihar.com>
Use in operator instead of find

Signed-off-by: Michal Čihař <michal@cihar.com>