@staticmethod
def __process_limits(lower, upper):
    """ Ensure that limits are specified correctly.

        :param lower: The lower bound of the interval.
        :param upper: The upper bound of the interval.
        :return: The correct lower and upper bounds.
        :raises ValueError: If any of the bounds isn't correct (e.g. not an
            integer) or if the upper bound is not greater than the lower bound.
        """
    try:
        lower = int(lower) if lower is not None else 0
        upper = int(upper) if upper is not None else float('Inf')
        if lower < upper:
            return lower, upper
        else:
            ValueError('Upper limit should be greater than lower limit')
    except ValueError:
        raise ValueError('Lower or upper is not an integer')
