Make metadata extract work for non-docs