Fix another java.util.NoSuchElementException: No value present

The If6c227d5134f81e7604b13800f90f785fa2ad206 fixed only one such place
in the code.

Bug: Issue 9820
Change-Id: Ifc175c499c5956a008e0e018871c4ecdd7d93335
diff --git a/src/main/java/com/googlesource/gerrit/plugins/avatars/external/ExternalUrlAvatarProvider.java b/src/main/java/com/googlesource/gerrit/plugins/avatars/external/ExternalUrlAvatarProvider.java
index fdac920..dd03c91 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/avatars/external/ExternalUrlAvatarProvider.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/avatars/external/ExternalUrlAvatarProvider.java
@@ -99,7 +99,7 @@
   @Override
   public String getChangeAvatarUrl(IdentifiedUser forUser) {
     String userReplacedAvatarChangeURL = replaceInUrl(USER_PLACEHOLDER,
-        avatarChangeUrl, forUser.getUserName().get());
+        avatarChangeUrl, forUser.getUserName().orElse(null));
     return replaceInUrl(EMAIL_PLACEHOLDER, userReplacedAvatarChangeURL,
         forUser.getAccount().getPreferredEmail());
   }