Created sumproduct tree update.
Correcting nullness check issues related to sum-product tree update