This particular hunk of code is just a tidy up to avoid an NPE and has nothing to do with the PR.