change value_to_property to accept instances of subclasses of allowed types