[Python-ideas] raise TypeError when giving wrong type of argument in functions