Checking tuple or list