Test that en error is triggered when an item of an invalid type is pushed