Recursively do the type checking.