code: func (s *UnionSchema) GetType(v reflect.Value) int {
  	if s.Types != nil {
  		for i := range s.Types {
  			if t := s.Types[i]; t.Validate(v) {
  				return i
  			}
  		}
  	}
  
  	return -1
  }
docs: // GetType gets the index of actual union type for a given value.