Add serialization for basic types