``ValueError`` seems better than ``TypeError`` here.