[4/8] widl: add helper function get_deref_type