Instead of using NSBinaryDataAttributeType I used isStoredInExternalRecord for attachments