if (array != null) {
for (int i = 0; i < array.size(); i++) {
final JsonObject incentiveElement = array.get(i).getAsJsonObject();
JsonCommand incentivesCommand = JsonCommand.fromExistingCommand(command, incentiveElement);
if (incentivesCommand.parameterExists(InterestIncentiveApiConstants.idParamName)) {
final Long interestIncentiveId = incentivesCommand
.longValueOfParameterNamed(InterestIncentiveApiConstants.idParamName);
final InterestIncentives interestIncentives = chartSlab.findInterestIncentive(interestIncentiveId);
if (interestIncentives == null) {
baseDataValidator.parameter(InterestIncentiveApiConstants.idParamName).value(interestIncentiveId)
.failWithCode("no.interest.incentive.associated.with.id");