SONAR: removed possible NPE
SONAR: fixed naming convention of enum