I see the code referenced in the pull request is still in place in master. There is no test case provided and I'm not sure if the NPE could/would happen in real use cases.