Ensured consistent use of oo-style forEach
Utils empty() now returns object. Added tests for it.