def none_or_is_callable(instance, attribute, value):
    """
    Can be None or callable.
    """
    if value is not None and not callable(value):
        raise TypeError('callback must be a callable, got %s' % type(value)
            .__name__)
