Fix "Call to a member function getUID() on null"
Fix "Call to a member function getUID() on null"

Signed-off-by: Lukas Reschke <65adda4326914576405c9e3a62f4904d96573863@statuscode.ch>

whitekiba/server,endsguy/server,nextcloud/server,michaelletzgus/nextcloud-server,xx621998xx/server,michaelletzgus/nextcloud-server,endsguy/server,nextcloud/server,pixelipo/server,Ardinis/server,Ardinis/server,whitekiba/server,xx621998xx/server,xx621998xx/server,michaelletzgus/nextcloud-server,pmattern/server,jbicha/server,andreas-p/nextcloud-server,whitekiba/server,endsguy/server,xx621998xx/server,endsguy/server,pixelipo/server,michaelletzgus/nextcloud-server,jbicha/server,Ardinis/server,pixelipo/server,jbicha/server,whitekiba/server,andreas-p/nextcloud-server,andreas-p/nextcloud-server,pmattern/server,endsguy/server,nextcloud/server,andreas-p/nextcloud-server,xx621998xx/server,pmattern/server,pmattern/server,Ardinis/server,jbicha/server,nextcloud/server,whitekiba/server,pixelipo/server,jbicha/server,pixelipo/server,Ardinis/server,andreas-p/nextcloud-server,pmattern/server