Set the doc snapshot to undefined when it doesn't have a type, as indicated in the comment
Initialize doc.snapshot to undefined, since V8 likes consistent object properties