Check that bpp has reasonable value

As bpp is often used for malloc computations, let's check that it has
a reasonable value.