Fix undefined method `[]' for nil:NilClass with Paperclip 3.5.2