adds try/catch around hasPenableParent

Handles errors when no there is no selection.