Check for undefined in foreach for totalOrders