Input checking code for Rotate and Crop