added null check during undo callback in AMTimeline.cs