Can exit

Allow states to conditionally prevent exiting with `canExit`.