title: How to catch an "undefined method `[]' for nil:NilClass" error?
body: <p>I get an nested array from facebook via omniauth and wanna check if it's empty?/nil?/exists?
  the depending line looks like:</p>
  
  <pre><code> unless omniauth['extra']['raw_info']['location']['name'].nil?
  </code></pre>
  
  <p>This should check if this part of the array is empty or exists.</p>
  
  <p>But always this error was thrown:</p>
  
  <pre><code>undefined method `[]' for nil:NilClass
  </code></pre>
  
  <p>Do I check arrays wrong?</p>
  
  <p>I tried it with "has_key" "nil?" "empty?" "exists?" "blank?"</p>
  
  <p>But no one of these works!</p>
  
  <p>Please help me, many thanks in advance!</p>