Return the right type of value.