This is rather minor, but you should always strive to do simple checks first and complex checks later. It increases both readability and performance. Here `params.isEmpty()` is obviously very cheap compared to the other condition which involves looping over a collection