check for existance of doc when converting _id:s