Fix a 'TypeError' exception.