Fix TypeError when 'stats' are undefined
Fix TypeError when 'stats' are undefined

Before fixing this issue user gets message: "TypeError: Cannot read property 'toJson' of undefined" and a stack trace.

After adding proposed check user is getting regular gulp error message with sense.
shama/webpack-stream