Added sanity check to prevent error with Advanced Custom Fields

Advanced Custom Fields, a very popular plugin for adding custom fields, sometimes uses attachments to store things in the wp_options table. This causes an error now that my sanity check corrects

http://wordpress.org/plugins/advanced-custom-fields/