By putting this logic here, you're assuming that a state handler will never return `None` except when the config changes underneath them and the only way to examine that assumption is to examine all the handlers. More importantly, it's easy to invalidate that assumption by unknowingly modifying handler code.

A `next_state` of `None` should indicate that the session is complete and should be cleaned up, nothing more. Anything outside that belongs either in the state handler or an exception handler, both of which are better able to determine what to do.