Handle nil attachments, as seen in Rails 2.3.18