Added a condition to destroy cURL only if an instance has been created