Error on loading obj file

i am loading a material and i want to have all children of the model inside the scene instead of the whole model object so that i can do better selection with raycasting.

new MTLLoader().setPath('models/').load('house_water.mtl', function (materials) {
            .load('house_water.obj', function (object) {
                object.traverse(function (child) {
                    if (child instanceof THREE.Mesh) {

when i do this i get this error !!

TypeError: Cannot read properties of undefined (reading 'traverse')
      at Group.traverse (three.module.js?a971:7938:1)
      at eval (client.ts?0176:41:1)
      at Object.eval [as onLoad] (OBJLoader.js?dac0:458:1)
      at eval (three.module.js?a971:39938:1)

can anyone please help me?