def check_dataset_range(dataset):
    """Confirm no rgb value is outside the range [0, 255]."""
    if dataset.max() > 255 or dataset.min() < 0:
        raise ValueError('The dataset has a value outside the range [0,255]')
