Added isValidTuple