Type checking of attributes in MenuDict.__init__