I have the following code on which sonar is throwing a check "Optional#isPresent()" before accessing value error.
private Map