We're doing reflection here - I suppose it would be better to build accessors that wrap this logic, but for now I think I'll keep the check