code: function isDeleted(type, id) {
      var typeInfo = getTypeInfo(type);
  
      return db.get(serialize(typeInfo.documentType, id))
        .then(function (doc) { return !!doc._deleted; })
        .catch(function (err) { return err.reason === "deleted" ? true : null; });
    }
docs: true = deleted, false = exists, null = not in database