Checked isValid before registering or unregistering events