Fix possible NPE when the mouse moves beyond the existing graph data