Enable max and min for non-numbers but comparable types.

it will be converted to a comparable before computing