Fix for issue 2050 on master: BigDecimal and nil multiplication

This commit fixes issue #2050 on master. This change adds null check and changes error type.