I have removed these isinstance calls by creating a dict with the key being the tab type and the value being the notification image handler.  The code then checks for which handler to call given the passed in tab type.