Should the same `null` check for `keystorePassword` be happening here to avoid an NPE?