def normalize_line(groups):
    """
    Takes match groups and uppercases them if they're not None.
    """

    result = []

    for g in groups:
        if g is None:
            result.append(None)
        else:
            result.append(g.upper())

    return result