Support keep_alive where nurse may be None
For example keep_alive<0,1>() should work where the return value may sometimes be None. At present a "Could not allocate weak reference!" exception is thrown.
Update documentation to clarify behaviour of keep_alive when nurse is None or does not support weak references.
diff --git a/docs/advanced.rst b/docs/advanced.rst
index 0a84a45..a050dfb 100644
--- a/docs/advanced.rst
+++ b/docs/advanced.rst
@@ -663,10 +663,13 @@
specified to indicate dependencies between parameters. There is currently just
one policy named ``keep_alive<Nurse, Patient>``, which indicates that the
argument with index ``Patient`` should be kept alive at least until the
-argument with index ``Nurse`` is freed by the garbage collector; argument
-indices start at one, while zero refers to the return value. For methods, index
-one refers to the implicit ``this`` pointer, while regular arguments begin at
-index two. Arbitrarily many call policies can be specified.
+argument with index ``Nurse`` is freed by the garbage collector, as long as the
+nurse object supports weak references (pybind11 extension classes all support
+weak references). If the nurse object does not support weak references and is
+not None an appropriate exception will be thrown. Argument indices start at
+one, while zero refers to the return value. For methods, index one refers to
+the implicit ``this`` pointer, while regular arguments begin at index two.
+Arbitrarily many call policies can be specified.
Consider the following example: the binding code for a list append operation
that ties the lifetime of the newly added element to the underlying container