Fix typo for isInvalid