Push the buffer length check down to the LazyPrimitive class for the ease of maintance.