def median(items):
    """Returns the median value of the argument items.

    Args:
        items (iterable): a list of numeric values

    Returns:
        numeric: the median of the list if non-empty else None

    """
    items = sorted(items)
    if len(items) < 1:
        return None
    if len(items) % 2 == 1:
        return items[(len(items) + 1) / 2 - 1]
    if len(items) % 2 == 0:
        return float(sum(items[len(items) / 2 - 1:len(items) / 2 + 1])) / 2.0
