```java
ALLOWED_SEVERITIES = ["fatal", "error", "warning", "info"];
if(severity == null || !Arrays.asList(ALLOWED_SEVERITIES).contains(severity)) {
    // ...
}
```