fixes #3178

I would split of the two branches:

```

@Override
public Object remove(Data dataKey) {
checkIfLoaded();
Record record = records.get(dataKey);
if (record == null) {
   return removeNonExistingRecord(...)
} else {
   return removeExistingRecord(...)
}
}
```

And add two methods: removeNonExistingRecord and removeExistingRecord. Although I find the name removeNonExistingRecord a but funky.