BigDecimal carbonQuantity1 = new BigDecimal(0.00); for (BaseEmissionVerificationDetail emissionVerificationDetail : baseEmissionVerificationDetail) { if (emissionVerificationDetail.getCarbonQuantity()!=null && !"".equals(emissionVerificationDetail.getCarbonQuantity())){ BigDecimal carbonQuantity = emissionVerificationDetail.getCarbonQuantity(); carbonQuantity1 = carbonQuantity1.add(carbonQuantity); } }