preventing null id from being added to the batch of counter events to be deleted