HPCC-12150 Check cached item pointer before using in getElementsPaged

Signed-off-by: Anthony Fishbeck <anthony.fishbeck@lexisnexis.com>