clear instance only if it is an object