Generalize operator check.