error check for invalid instance id