Not needed here because of the built-in ambiguity check.
For a general case, take
isstruct(obj::T) where {T} = !isprimitivetype(T)
isstruct(obj::Union{Array,Tuple,String}) = false
could then be expressed by something like
!isprimitivetype(T) without Union{Array,Tuple,String}