I need to check integrity of nested schemas and hence am writing case classes to do so. The main hurdle I am facing is the schema may have a field (say, `name`) either of a `String` or a `Utf8` type and I want to accept both the instances. Is it possible to avoid having two case classes as 

```
 case class NameValueString(name: String, value: Double)
 case class NameValueUtf8(name: Utf8, value: Double)

```

and something like

```
 case class NameValue(name @(_:String | _:Utf8), value: Double)

```

The above expression certainly fails compilation.

Nikhil