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. Also mediates the irreversible deamidation of specific glutamine residues to glutamic acid (By similarity). Does not interact with the C-terminal pentapeptide of the chemoreceptors (PubMed:33187094). [protein]-L-glutamate 5-O-methyl ester + H2O = H(+) + L-glutamyl-[protein] + methanol H2O + L-glutaminyl-[protein] = L-glutamyl-[protein] + NH4(+) Contains a C-terminal catalytic domain, and an N-terminal region which modulates catalytic activity. Domains are connected by a linker of approximately 25 amino acids (PubMed:33187094). The structural disorder in the region homologous to the pentapeptide-binding site in E.coli may be related to the failure to bind pentapeptides (PubMed:33187094). Phosphorylated by CheA. Phosphorylation of the N-terminal regulatory domain activates the methylesterase activity. Mutant does not mediate chemotaxis towards casamino acids. Belongs to the CheB family.