As args is a frozenset, doing x.is_Boolean or is_literal(x) for x in args gives an error. And is is_literal necessary, considering is_Boolean covers literals too?