Add input validations for sprite generation