Fix yet another null pointer exception

Change-Id: I01d1beffd7038f34b5e63dc4faee495ef2266693
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 056a1f2..bf7143c 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
@@ -114,7 +114,8 @@
    */
   private String replaceInUrl(String placeholder, String url,
       String replacement) {
-    if (url == null || !url.contains(placeholder)) {
+    if (url == null || replacement == null
+        || !url.contains(placeholder)) {
       return url;
     }