Simplify range-checking functions for subopt parsing.