minor NPE check on shutdown