I would check for `attr in cls.fields`, rather than whether the class class the attribute, so that non-field attributes don't trip you up.