Fix the reporting of a useless NPE