check if undoManager exists