restore TypeError being raised for dictionary