Merge "Fix possible NPE" into jb-mr2-dev