change assert on saving entity because subclasses aren't checked right.