Replace MAX, MIN, ABS macros by type-checking variants.