dialog: Avoid assumption that enum val_type can have negative value.