title: Pyside eventFilter and handling the case of None or missing attributes
body: <p>I have a eventFilter in place for my Label class, which works but it gives an error when there are no required attributes in place.</p>
  
  <p>How Should I check when and if the attributes are there? For example in this case:
  Event.Buttons().</p>
  
  <pre><code>self.installEventFilter(self)
  
  # Handles mouse events
  def eventFilter(self, object, event):
      if event.buttons() == QtCore.Qt.LeftButton:
          print ('QtGui.QCursor.pos()')
  </code></pre>