another, completely different approach would be to actually change the way length works on association objects, thus, only harming the performance on length validations for associations, and not needing the type checks.