Better check than believe the value type returned by #ancestors .
TypeMapByClass: Add test for invlid coder object.