That other error is concerning as well, I would suggest you to try figure it out.
But sure I agree we can integrate your patch, in case similar issues happen again there’s no reason to “hide” the real problem with a distracting NPE.