Using has_type(list(Type), X) with user created type not working as expected