HPCC-12351 Avoid compiler error - ensure both branches are const char *

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Merge pull request #6660 from ghalliday/issue12351b

HPCC-12351 Avoid compiler error - ensure both branches are const char *

Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>