Fix typo for isInvalid

Sadly I managed to typo `isInvalid` from #139.

[My emperor I have failed you](https://www.youtube.com/watch?v=Wz0d2acCBG8).