title: Is there a clean way to avoid calling a method on nil in a nested params hash?
body: <p>I'm interested in getting the nested 'name' parameter of a params hash. Calling something like</p>
  
  <pre><code>params[:subject][:name]
  </code></pre>
  
  <p>throws an error when params[:subject] is empty. To avoid this error I usually write something like this:</p>
  
  <pre><code>if params[:subject] &amp;&amp; params[:subject][:name]
  </code></pre>
  
  <p>Is there a cleaner way to implement this?</p>