IntOrString for use in JSON/YAML

Specifying an API type as IntOrString will allow JSON and YAML to accept
either ints or strings with the same name.  For example, port names or
numbers.
Instead of trying to cast the value to an int and then a string, you can use Go's type switch:

switch t := value.(type) {
case int:
    ... return true
case string:
    ... return true
default:
    return false
}