* Added checks for nil pointers in Marshal functions * Set nil pointer to identity in GT before marshaling