Add type checking to ODM fields