`TypeError` would be more appropriate here
"Raised when an operation or function is applied to an object of inappropriate type."