def lookup(object, key):
    """
    Looks up for key in object.
    Returns None if key is not found.
    """
    try:
        return object[key]
    except (KeyError, IndexError, TypeError):
        return None