Created by: rafgoncas1
I have changed the way of checking empty maps and lists, instead of checking if the size is greater than 0, It is more understandable and efficient using !x.isEmpty() method. Also, instead of using stream().filter().findFirst().isPresent(), it is recomendable using its equivalent stream().anyMatch() which as well, makes it easier to understand and efficient.
These are fixes for code smells provided from SonarCloud.