Add condition for error.stack, jshint cleanup