change fun(type Arg) to fun(Arg) when is_instance(Arg, type)