the problem turned out to be that that checking of token type vs. input type was done in the wrong direction.
instead of checking whether the input type is of type of the token (that is it is the same as or extends it) it was done the other way around.
the problem turned out to be that that checking of token type vs. input type was done in the wrong direction. instead of checking whether the input type is of type of the token (that is it is the same as or extends it) it was done the other way around.