shared_ptr is too smart to accept NULL

Change-Id: Id1bc223ffe2a8811219cdc47d145cd139199281a
Reviewed-on: https://gerrit.libreoffice.org/11767
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
(cherry picked from commit 055e19c749caae1c72ec3fb06bd72e52d51c40c4)
Reviewed-on: https://gerrit.libreoffice.org/11771
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>