minmax: New module, safe min and max macros