NPE check on xygraph