Added createSampler argument validation