def check_id(type, idstring)
      if idstring.class == Fixnum
        return make_read_url(type, idstring)
      end

      if (idstring.class == String)
        return idstring if idstring.index("http") == 0
        return ref_by_formatted_id(type, idstring.split("|")[1]) if idstring.index("FormattedID") == 0
      end
      make_read_url(type, idstring)
    end
def check_id(type, idstring)
      if idstring.class == Fixnum
        return make_read_url(type, idstring)
      end

      if (idstring.class == String)
        return idstring if idstring.index("http") == 0
        return ref_by_formatted_id(type, idstring.split("|")[1]) if idstring.index("FormattedID") == 0
      end
      make_read_url(type, idstring)
    end
expecting idstring to have "FormattedID|DE45" or the objectID or a ref itself