Destroy ZContext only when it's not null