add missing safe guard in checkbox callback