Add exceptions to ensure the dimensions and to test a zero size for a bi...

more tests