Fix BigDecimal NaN demongoization.

[ close #2851 ]