Bug XXX Part 2 - Add null pointer check for touch and selection carets