diff --git a/lib/perf_hooks.js b/lib/perf_hooks.js index 83e43af6cfd181..d822c5de71bd46 100644 --- a/lib/perf_hooks.js +++ b/lib/perf_hooks.js @@ -332,7 +332,7 @@ class PerformanceObserver extends AsyncResource { } observe(options) { - if (typeof options !== 'object' || options == null) { + if (typeof options !== 'object' || options === null) { throw new ERR_INVALID_ARG_TYPE('options', 'Object', options); } if (!Array.isArray(options.entryTypes)) { diff --git a/lib/trace_events.js b/lib/trace_events.js index 0d533c76a78253..f142afded15d56 100644 --- a/lib/trace_events.js +++ b/lib/trace_events.js @@ -73,7 +73,7 @@ class Tracing { } function createTracing(options) { - if (typeof options !== 'object' || options == null) + if (typeof options !== 'object' || options === null) throw new ERR_INVALID_ARG_TYPE('options', 'object', options); if (!Array.isArray(options.categories)) {