Creation of exception handling for animationtype setting