You either never allow null values in database, application or view and initialize everything with new BigDecimal(0) or perform null checks on every usage for nullable values.
Can BigDecimal have null value?
You either never allow null values in database, application or view and initialize everything with new BigDecimal(0) or perform null checks on every usage for nullable values.
Can BigDecimal be negative?
The value of the BigDecimal is (BigInteger/10**scale). A negative scale will result in a NumberFormatException.