Add _stringify wrapper function to fix encoding of single quote marks, which are required for some Query API usage.