title: Ruby - how can I deal with a variable if it doesn't exist
body: <p>I want do <code>puts blob</code></p>
  
  <p>but if the blob variable doesn't exist, I get  </p>
  
  <pre><code>NameError: undefined local variable or method `blob' for main:Object
  </code></pre>
  
  <p>I've tried  </p>
  
  <pre><code>blob?  
  blob.is_a?('String')
  puts "g" if blob  
  puts "g" catch NameError
  puts "g" catch 'NameError'
  </code></pre>
  
  <p>but none work.</p>
  
  <p>I can get around it by using an @instance variable but that feels like cheating as I should know about and deal with the issue of no value accordingly.</p>