diff --git a/dist/cache-save/index.js b/dist/cache-save/index.js
index 052bb13b..35d54949 100644
--- a/dist/cache-save/index.js
+++ b/dist/cache-save/index.js
@@ -83348,7 +83348,7 @@ function getNodeVersionFromFile(versionFilePath) {
     try {
         const manifest = JSON.parse(contents);
         // Presume package.json file.
-        if (typeof manifest === 'object' && manifest !== null) {
+        if (typeof manifest === 'object' && !!manifest) {
             // Support Volta.
             // See https://docs.volta.sh/guide/understanding#managing-your-project
             if ((_a = manifest.volta) === null || _a === void 0 ? void 0 : _a.node) {
diff --git a/dist/setup/index.js b/dist/setup/index.js
index 849917da..c0eade6d 100644
--- a/dist/setup/index.js
+++ b/dist/setup/index.js
@@ -93795,7 +93795,7 @@ function getNodeVersionFromFile(versionFilePath) {
     try {
         const manifest = JSON.parse(contents);
         // Presume package.json file.
-        if (typeof manifest === 'object' && manifest !== null) {
+        if (typeof manifest === 'object' && !!manifest) {
             // Support Volta.
             // See https://docs.volta.sh/guide/understanding#managing-your-project
             if ((_a = manifest.volta) === null || _a === void 0 ? void 0 : _a.node) {
diff --git a/src/util.ts b/src/util.ts
index c02524e3..cc6ac310 100644
--- a/src/util.ts
+++ b/src/util.ts
@@ -18,7 +18,7 @@ export function getNodeVersionFromFile(versionFilePath: string): string | null {
     const manifest = JSON.parse(contents);
 
     // Presume package.json file.
-    if (typeof manifest === 'object' && manifest !== null) {
+    if (typeof manifest === 'object' && !!manifest) {
       // Support Volta.
       // See https://docs.volta.sh/guide/understanding#managing-your-project
       if (manifest.volta?.node) {