Remove check of document.metadata / document.data