support is_a_helper for structs with more than one code