Error handlers for min/max functions