Fix misprint in "isValid" method