Check for undefined model

fixes warning about transitionTo being deprecated