Avoiding 'finishEncoding not called' warning by checking if data conforms to NSCopying protocol