Fix undefined checks for es6
Fix undefined checks for es6

RaananW/Babylon.js,BabylonJS/Babylon.js,sebavan/Babylon.js,RaananW/Babylon.js,BabylonJS/Babylon.js,sebavan/Babylon.js,RaananW/Babylon.js,BabylonJS/Babylon.js,sebavan/Babylon.js