lazy doc id check