Fix bug when initial state is None

When initial state is None the engine was allowing a change to ANY
state: even an undefined state. Now raises an exception when attempting
to change from an initial state of None to an undefined state.