Fix for issue 2050 on master: BigDecimal and nil multiplication #2123

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