Util: Efficiency improvement in forEachObj