Fix for issue #726

This is a fix for issue #726.
When the forEach function is called and the current value is undefined it skips the current iteration and goes to the next one.