Null ptr check in value assignment
Merge pull request #6687 from dumganhar/value-fix

Null ptr check in value assignment