Check for Tkinter before using it as base class