Created BadInputException and Type classes.