Simple NPE, added a check and a link to upstream bugzilla entry