add ability to raise errors for unexpected keys