Fix: MAGN-683 Switching tab eventually causes crash in undo

Background
==========

This commit is meant to fix [issue 725](https://github.com/ikeough/Dynamo/issues/725) reported by user anagpuyol.

It appears that when user switches among tabs, the **dynNodeView.DataContext** became **DisconnectedItem**. **DataContext** is needed to obtain the bound **NodeViewModel** given a **dynNodeView**, if it becomes **DisconnectedItem** then **dynNodeView.ViewModel** property will be returned a null. During the undo operation, **ViewModel.SetLacingTypeCommand** is accessed and since it returns null, this results in a null object reference exception.

Unit testing
============
All existing unit test cases are passing with the code changes.