Make min/max work on all types