Added safety checks in VecBoxSum