def get_value_by_id(driver, id):
    """Returns the value of the object in the html doc

    Args:
        driver (webdriver): Selenium Webdriver
        id (str): HTML id that you want to retrieve

    Returns:
        str: Value of the HTML element that contains the ID
    """
    try:
        return driver.find_element_by_id(id).get_attribute("value")
    except Exception:
        return None