TypeError occurs when self.button=None in MouseEvents

when printing MouseEvent with button=None a typeError would occur