Changes to ValueError and TypeError message