restrict query operators only for key types