consider using a helper function to factor the common logic between `_check_max_num` and `_check_min_num`