<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add(self, entry):
 """Add entries to the blacklist. This method adds the given 'entry' to the blacklist. :param entry: entry to add to the blacklist """

        # Empty or None values for organizations are not allowed
        if not entry:
            return CMD_SUCCESS

        try:
            api.add_to_matching_blacklist(self.db, entry)
        except InvalidValueError as e:
            # If the code reaches here, something really wrong has happened
            # because entry cannot be None or empty
            raise RuntimeError(str(e))
        except AlreadyExistsError as e:
            msg = "%s already exists in the registry" % entry
            self.error(msg)
            return e.code

        return CMD_SUCCESS