IMO, it should throw an exception. This will make it clear during development that something is wrong, and it would be easier to find a problem when a stack trace is dumped than it is to wonder "Why are all my items tagged as white? I wanted green?"