Fix runtime detection exception when NP detected as null

* Adds null check
* Transforms null to "null" (String)
* Logs a warning