Relying on a particular attribute of the model might not be the cleanest solution, though I can't think of a better one that isn't a ton more work.