Involved in chemotaxis. Part of a chemotaxis signal transduction system that modulates chemotaxis in response to various stimuli. Catalyzes the demethylation of specific methylglutamate residues introduced into the chemoreceptors (methyl-accepting chemotaxis proteins or MCP) by CheR (PubMed:2991277, PubMed:2677005, PubMed:9760239). Also mediates the irreversible deamidation of specific glutamine residues to glutamic acid (By similarity). [protein]-L-glutamate 5-O-methyl ester + H2O = H(+) + L-glutamyl-[protein] + methanol H2O + L-glutaminyl-[protein] = L-glutamyl-[protein] + NH4(+) Phosphorylation of the N-terminal regulatory domain activates the methylesterase activity. Interacts with CheA. Contains a C-terminal catalytic domain, and an N-terminal region which modulates catalytic activity (PubMed:2991277, PubMed:9760239). The N-terminal domain is not essential for catalysis (PubMed:2991277). Phosphorylated by CheA (PubMed:3280143, PubMed:2677005, PubMed:9465023). Phosphorylation of the N-terminal regulatory domain activates the methylesterase activity (PubMed:2677005, PubMed:9760239). Two forms were isolated, the intact protein and a proteolytic fragment (147-349) that is 15-fold more active than its precursor. Cells lacking this gene display a strong clockwise motor bias; in combination with a yhjH disruption cells switch to a counterclockwise bias. Belongs to the CheB family.