Fixing NPE in MemoryLeakUtil