make event type and state validation case-insensitive, fixes #424; fix a duplicated test