Fixed crash caused by documents with empty bodies.