Type-aware Query Helper