More rigorous argument validation in createSubBuffer