Added typecheck for 2nd parameter to .min() and .max()