Fix an issue resulting from Object not having a forEach method