Handle the integers and enums in generic closure wrapper

Handle edge-case when the one of generic parameters of delegate is an
integer in closure or method.