check_range function

Check that an argument is a numerical range