Unbreak attachmentOptions

This check fails if attachmentOptions isn't set because it looks at options.attachmentOptions, which may be (and in my case is) undefined.