Be more precise in p6_to_p5 signatures

all undefined values should result in undef; the type-specific code only works for defined values,
not for the type objects