handle possible Nonetype in tab change listener