Add a null check before calling Dispose(), you never know.