def to_addressable_uri(uri)
      uri.nil? || uri.is_a?(Addressable::URI) ? uri : Addressable::URI.parse(uri)
    end
def to_addressable_uri(uri)
      uri.nil? || uri.is_a?(Addressable::URI) ? uri : Addressable::URI.parse(uri)
    end
if uri is nil, returns nil; otherwise, tries to return a Addressable::URI