Check for NPE and isDisposed