Seems like returning None is the wrong thing to do. If nothing needs to be done, you can return a no-op function: `lambda found_id: found_id`. If the parameters you've passed to this function don't make sense, you can raise an exception. I can't think of a case where returning None is the best option -- but maybe I'm just not seeing it.