cyclic type checking for records