Merge "Fix NPE due to the lack of null-check" into lmp-dev