Adding a safety check for 'null' values.
Automatically rewritten for npm.