add typeOf for NTuples; make NTuple covariant

This pull request will enable defining functions taking NTuples.
these names are not great. Is this meant to be public? Can it be private?