How to distinguish between UnionAll and DataType of the same type?

Hi,
let’s assume that I have a struct like

julia> struct MM{T}
           x::T
       end

julia> const TypeGen{T} = MM{M} where M<:T
MM{M} where M<:T where T

julia> TypeGen{Int}
MM{M} where M<:Int64

julia> f(::Type{T}) where T<:MM = :A
f (generic function with 1 method)

julia> f(TypeGen{Int})
:A

julia> f(MM{Int})
:A

julia> typeof(MM{Int})
DataType

julia> typeof(TypeGen{Int})
UnionAll

is there a way to come up with a function signature for multi dispatch that differentiates between two types shown above?

Thanks

Solved
f(::Type{M{T}}) where T = :B