Catch situations where no type information is available.

clear_lpctype_ref() and get_lpctype_name() didn't account for a
NULL pointer being passed as a type. Also get_common_type()
should not return a NULL pointer as a success when a NULL
pointer was given. (NULL pointer denote missing type information,
which is perfectly acceptable.)