```javascript
if(value != "") {
    return value;
}
```

It will reach the end of the function and still return undefined.

Actually I can inject an array of possible values from the java generator and undefined should be returned if `value` is not one of those... That's probably overkill