def is_local_host(location):
    """
    :param location: Location string in the format ip[/slot[/port]].
    :returns: True if ip represents localhost or offilne else return False.
    """
    return any(x in location.lower() for x in ('localhost', '127.0.0.1', 'offline', 'null'))