Check if context is initialized before attempting to destroy it.