Thanks to jaguarandi for initial pointers. Changes in arith is a simple added function to check for null vectors.