SONARJAVA-9 Avoid NPE