Without JSON.parse, you cannot.

You can evaluate hello and alter its value later on in the code, which is much more real-world scenario.

hello = hello === 'null' ? null : hello
Answer from tonymke on Stack Overflow
🌐
GitHub
github.com › mholt › PapaParse › issues › 710
.parse converting empty string to null? · Issue #710 · mholt/PapaParse
September 18, 2019 - I firstly wanted to thank you for this incredible tool! I was curious - it looks like setting dynamic typing: true turns empty strings into null? dynamic typing is rad, is there any way to override just this one feature? Clarification Th...
Author: mholt
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Operators › null
null - JavaScript - MDN Web Docs - Mozilla
Unlike undefined, JSON.stringify() can represent null faithfully. JavaScript is unique to have two nullish values: null and undefined. Semantically, their difference is very minor: undefined represents the absence of a value, while null represents the absence of an object.
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › JSON › parse
JSON.parse() - JavaScript - MDN Web Docs
JSON.parse("{}"); // {} JSON.parse("true"); // true JSON.parse('"foo"'); // "foo" JSON.parse('[1, 5, "false"]'); // [1, 5, "false"] JSON.parse("null"); // null
🌐
TutorialsPoint
tutorialspoint.com › how-null-is-converted-to-string-in-javascript
How null is converted to String in JavaScript?
August 11, 2022 - If we concatenate null with an empty string (""), the result will be of string type. We can use this technique to convert null to string. We use + operator to concatenate the null and empty string("").
🌐
GeeksforGeeks
geeksforgeeks.org › javascript › javascript-convert-string-number-to-a-number-or-null-return-0-for-0
JavaScript - Convert String/Number to a Number or Null, Return 0 for 0 - GeeksforGeeks
August 5, 2025 - If true, it returns null. The special case for 0 ensures that 0 is explicitly returned when the input is either '0' or 0 itself. If you want to convert a string to a whole number (parseInt()) or a floating-point number (parseFloat()), both methods behave similarly to Number() but also parse the string from the beginning until they encounter a character that is not a valid digit. JavaScript ·
Find elsewhere
🌐
Experts Exchange
experts-exchange.com › questions › 24576047 › Javascript-convert-null-to-zero.html
Solved: Javascript convert null to zero | Experts Exchange
July 16, 2009 - You can use: IsNaN(<value>) ? 0 : <value> If you wish to use a function and specifically look for a null then: function IsNull(value, default) { return value == null ? default : value; } EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
🌐
GitHub
github.com › total-typescript › ts-reset › issues › 173
allow passing `null` to `JSON.parse()` · Issue #173 · mattpocock/ts-reset
October 16, 2023 - allow passing null to JSON.parse()#173 · #174 · Copy link · ImLunaHey · opened · on Oct 16, 2023 · Issue body actions · Currently this fails type checking yet it works in all js environments I've tried. JSON.parse(localStorage.getItem('a')); Reactions are currently unavailable ·
Author: mattpocock
🌐
Built In
builtin.com › software-engineering-perspectives › javascript-null-check
How to Check for Null in JavaScript | Built In
Summary: JavaScript offers several ways to check for null, including strict (===) and loose (==) equality, Object.is() and boolean coercion. Developers often use typeof and optional chaining (?.) to safely identify null, undefined or undeclared ...
🌐
Java2s
java2s.com › Tutorials › Javascript › Data_Type › String › Convert_null_to_string_with_String_in_JavaScript.htm
Convert null to string with String() in JavaScript
The following code shows how to convert null to string with String(). <!DOCTYPE html> <html> <head> <script type="text/javascript"> var value3 = null;<!-- ww w . j a va 2 s .
🌐
Coderwall
coderwall.com › p › kwhkig › javascript-number-conversion
Javascript - number conversion (Example)
February 25, 2016 - Parsing null: Number(null) = 0 parseFloat(null) = NaN parseInt(null) = NaN · Parsing undefined: Number(undefined) = NaN parseFloat(undefined) = NaN parseInt(undefined) = NaN · Parsing NaN: Number(NaN) = NaN parseFloat(NaN) = NaN parseInt(NaN) ...