handle wildcards and primitive types