raising argument error when a bad type is passed