Argument validation in createBuffer, createCommandQueue