Look this
//some imports ...
//some code...
BigDecimal balance = account.getBalance();
if(balance != null && balance.compareTo(BigDecimal.Zero) == 0){
//.. do something
}It's not clean code :tear: ...
Apply ComparableBigDecimal.... and now look this! 👍
//some imports ...
import static BigDecimalUtil.*;
import static ComparableBigDecimal;
//some code...
BigDecimal balance = account.getBalance();
if(value(balance, isZeroOrNull()){
//.. do something
}Zero or nullIgual toGreater thanLess than