Checking if instances exist before patching them