    def get_id(self):
        # FIXME: This will not work with ID strings that happen to be
        #        convertible to an int.
        id_str = self.get('id')
        try:
            id_val = int(id_str)
        except ValueError:
            id_val = id_str
        except TypeError: # Happens if the id string is None.
            id_val = id_str
        return id_val