empty ts result check

Add a check to correctly return an empty result to torquescript