because in testing it occasionally would return successfully with `undefined` for the doc, needed to nip that in the bud