Add the `isLastTransition` method.