Changed to checkKeyValidity