SONAR-4462 Fix NPE when no realm configured