import re


def validate_hair_color(passport: dict) -> bool:
    """
    Return True if value of haircolor is a # followed by exactly six characters 0-9 or a-f.

    DOCTEST
    >>> validate_hair_color(passport={"hcl": "#123abc", "byr": "1937"})
    True
    >>> validate_hair_color(passport={"hcl": "#123abz", "byr": "1937"})
    False
    >>> validate_hair_color(passport={"hcl": "123abz", "byr": "1937"})
    False
    """

    hair_color = passport.get("hcl")
    if not hair_color:
        return False

    if re.match("#[0-9a-f]{6}", hair_color):
        return True
    return False