Added logic to check whether stateClasses and transitionClasses exists in StateMachine