Thanks! I eventually came up with something like this:
website = age.search("//div[@class='listing_content']/ul[@class='features']/li[1]")
# initializes the link variable with something
link = "super"
# The segment below grabs the URL of the listing's website, if it has ne. Otherwise it
# puts 'nil' into the link variable
if website.inner_text() == "ยป Website"
website.search("a").map do |l|
link = l['href']
end
else
link = "nil"
end