def check_numeric_indicator(var: str, index: str, messages: list) -> bool:
    """Checks that variable's numeric
    indicator is "0", "1" or "2".

    Parameters
    ----------
    var : str
        Metadata variable in criteria.
    index : str
        Numeric indicator.
    messages : list
        Message to print in case of error.

    Returns
    -------
    boolean : bool
        Whether to keep the key/value or not.

    """
    boolean = False
    if index not in ['0', '1', '2']:
        messages.append('Numeric indicator not "0", "1" or "2" (%s) (%s skipped)' % (index, var))
        boolean = True
    return boolean