added type assert to toq
Merge pull request #4148 from astrieanna/toqtype

added type assert to toq