Add instanceof check for Error in node

* instanceof is faster so put it first:
  http://jsperf.com/error-instanceof-performance