I think it is a good idea to check the existence of attachment for user before invoking attachment.deleteRecord. And then check absence of that attachment after invoking deleteRecord.