Changed frozenset values to lowercase; made 'if' block check for typ.lower().