Add wanted_type() and an approximation of wanted().