I've added a `TypeError` based solution for your delectation.