Fixed "!" in isValid