import statistics


def median(values):
    """Get the median of the provided values.

    :param values: An iterable of values to be evaluated. They may be of different number types.

    .. note::
        This is just a convenience wrapper around the statistics module, but captures ``StatisticsError`` and returns
        ``None`` if ``values`` is empty.

    """
    try:
        return statistics.median(values)
    except statistics.StatisticsError:
        return None