Minor code style: isinstance can check tuple types.