SONARJAVA-668 Fix NPE