Fix unhandled rejection reporting for null errors

In case promise is rejected with a 'null' and unhadled rejection is reported check for error type fails in 'formatError' method. The reason for it is that 'typeof null' is also an 'object' (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof). 

Therefore an additional check for 'e' to also not be a 'null' is added to 'formatError' method code.