guard docs with id in upserts