typo ? checKeyValidity -> checkKeyValidity