def reverse_direction(direction):
    """
    Returns the opposite direction for a given direction, e.g. "north" becomes
    "south"

    :param str direction: direction to reverse
    :return: opposite direction. None if invalid direction is provided
    :rtype: str
    """
    if not direction:
        return None

    if direction == 'north':
        return 'south'
    elif direction == 'south':
        return 'north'
    elif direction == 'east':
        return 'west'
    elif direction == 'west':
        return 'east'

    return None