Is there a way to remove a certain type from a Union of types?

There is

julia> Core.Compiler.typesubtract(Union{Int,Float64,String}, String)
Union{Float64, Int64}

but as you can see, it is a pretty internal function.

6 Likes