import imghdr


def validate_image_header(filename: str):
    """Validate that an image has a valid header.

    Returns True if valid, False if invalid.

    :param filename: name of file to analyze
    :type filename: str
    :return: flag indicating whether header is valid (by using `imghdr.what()`)
    :rtype: bool
    """

    status = imghdr.what(filename)
    if status is not None:
        return True
    else:
        return False