Add null check for getServer in GerritManagement.

Change-Id: I668bc7a0a12c8baa53774c6d2e4fad54b9758d4d