Visit objects function with ocaml metadata