code: def validate_is_callable_or_none(option, value):
      
      if value is None:
          return value
      if not callable(value):
          raise ValueError("%s must be a callable" % (option,))
      return value
docs: Validates that 'value' is a callable.