Revert "Adjust the location of stripping null values."

This reverts commit b46b2ee553e849681e49e40f06a7461771fc3c0d.
Ensure value is string before attempting decodeURIComponent