fixed warn and replace NULL with nullptr.
Merge pull request #7366 from Dhilan007/v3-fixed-warn

fixed warn and replace NULL with nullptr.