def isheader(string):
    """
    Check if a string looks like a star header line.

    Args:
        string (str): line of a star file
    Returns:
        true if the line looks like a star file header lines
        false if the line is expected to be a star file data line.
    """
    try:
        string = string.decode()
    except AttributeError:
        pass
    if string.startswith("_"):
        return True
    if string.startswith("#"):
        return True
    if string.startswith("data_"):
        return True
    if string.startswith("loop_"):
        return True
    if string.isspace():
        return True
    return False