Handling different CoreData data types