added test for NULL pointer behaviour for System::add(...) and the fixes. (Refs #807)