Fix possible NPEs in ReplaceRequest.cmd usage in ReceiveCommits

The cmd field is populated by validate(boolean). If this method
fails we may not be able to set results on all ReplaceRequests.
Guard the attempt to access the field with a null check.

Change-Id: Ib0b87f8751f40b25790bd630f9438177b091decc
1 file changed