title: ruby, undefined method `text' for nil:NilClass
body: <p>Sometimes the price of the items in the result is not defined, so whe I run this code :</p>
  
  <pre><code>price =  result.search('span.result-price')[0].text
  </code></pre>
  
  <p>I got :  undefined method `text' for nil:NilClass</p>
  
  <p>Is there anyway how to avoid this exception and assign for example price = $0000 when it's not defined.
  Thanks.</p>