Type value serialization and returning