do you need to add a null check to Dygraph.removeEvent()?