got tuple to work but not happy with the error message
better type checking for tuple