Utils for working with document metadata.