title: How to fix undefined method `split' for nil:NilClass error?
body: <p>I have the following line in my Rails app:</p>
  
  <pre><code>@images = @product.secondary_images.split(",")
  </code></pre>
  
  <p>When @product.secondary_images has content in it, this runs fine.  However, when there is no content, I get this error:</p>
  
  <pre><code>undefined method `split' for nil:NilClass
  </code></pre>
  
  <p>How can I assign another value to @images if there is no content in it?</p>