Improved API input validation for Slices and Slivers (#304)