title: TypeError (Can't convert nil into String) With Attachment_Fu
body: <p>I'm handling file attachments in my Rails app with Attachment_fu, which provides a <code>public_filename</code> method to retrieve a file's URL.
  I'm using it on a model called Cover, so if I want to call the URL of an uploaded cover image, in a view I would do:</p>
  
  <pre><code>&lt;%= image_tag(@cover.public_filename) %&gt;
  </code></pre>
  
  <p>This works just fine when the user has the appropriate attachment, but in my application it is not a requirement for a user to upload an attachment. </p>
  
  <p>Therefore, calling <code>@cover.public_filename</code> will throw a TypeError: Can't convert nil into String for the obvious reason that the file is nil.</p>
  
  <p>However, I'm having trouble adding logic to this problem effectively since the object is nil, and all of my attempts with doing things like <code>unless @cover.public_filename.nil?</code> or <code>if @cover.public_filename == nil</code> have been fruitless and cause the same Type Error.</p>
  
  <p>What am I missing?</p>