馃崚 kcms/tablet: Add more safeguards against possible null derefs and OOB
Not sure if these are being hit, but just to be safe let's add them.
(cherry picked from commit 6b23372a)