Added actually missing type check in MAX/MIN macros