return if file is nil

This solves the problem when the file is nil attachment_url raised an exception
related to #25