Add a test function for type constructor errors