Prevent segfaults when passing null to some methods that expect a wrapped object.