def dBoxId(boxId):
    """Return box id if valid, raise an exception in other case"""
    if boxId >= 0:
        return boxId
    else:
        raise ValueError(
            '{} is not a valid Box Id, Box Id must be >= 0'.format(boxId))