Adds a getObjLength method