Index: /trunk/src/org/openstreetmap/josm/actions/CopyCoordinatesAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/CopyCoordinatesAction.java	(revision 11380)
+++ /trunk/src/org/openstreetmap/josm/actions/CopyCoordinatesAction.java	(revision 11381)
@@ -51,5 +51,5 @@
     private Collection<Node> getSelectedNodes() {
         DataSet ds = getLayerManager().getEditDataSet();
-        if (ds == null || ds.getSelected() == null) {
+        if (ds == null) {
             return Collections.emptyList();
         } else {
Index: /trunk/src/org/openstreetmap/josm/actions/ZoomToAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/ZoomToAction.java	(revision 11380)
+++ /trunk/src/org/openstreetmap/josm/actions/ZoomToAction.java	(revision 11381)
@@ -70,5 +70,5 @@
             return;
         int[] rows = this.table.getSelectedRows();
-        if (rows == null || rows.length == 0)
+        if (rows.length == 0)
             return;
         int row = rows[0];
Index: /trunk/src/org/openstreetmap/josm/actions/mapmode/ImproveWayAccuracyAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/mapmode/ImproveWayAccuracyAction.java	(revision 11380)
+++ /trunk/src/org/openstreetmap/josm/actions/mapmode/ImproveWayAccuracyAction.java	(revision 11381)
@@ -401,5 +401,5 @@
                 updateStateByCurrentSelection();
             }
-        } else if (state == State.IMPROVING && mousePos != null) {
+        } else if (state == State.IMPROVING) {
             // Checking if the new coordinate is outside of the world
             if (mv.getLatLon(mousePos.x, mousePos.y).isOutSideWorld()) {
Index: /trunk/src/org/openstreetmap/josm/actions/mapmode/PlayHeadDragMode.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/mapmode/PlayHeadDragMode.java	(revision 11380)
+++ /trunk/src/org/openstreetmap/josm/actions/mapmode/PlayHeadDragMode.java	(revision 11381)
@@ -66,7 +66,6 @@
 
     @Override public void mouseReleased(MouseEvent ev) {
-        Point p = ev.getPoint();
         mouseStart = null;
-        if (ev.getButton() != MouseEvent.BUTTON1 || p == null || !dragging)
+        if (ev.getButton() != MouseEvent.BUTTON1 || !dragging)
             return;
 
Index: /trunk/src/org/openstreetmap/josm/data/CustomConfigurator.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/CustomConfigurator.java	(revision 11380)
+++ /trunk/src/org/openstreetmap/josm/data/CustomConfigurator.java	(revision 11381)
@@ -566,10 +566,6 @@
                 String pattern = evalVars(item.getAttribute("pattern"));
                 String key = evalVars(item.getAttribute("key"));
-                if (key != null) {
-                    PreferencesUtils.deletePreferenceKey(key, mainPrefs);
-                }
-                if (pattern != null) {
-                    PreferencesUtils.deletePreferenceKeyByPattern(pattern, mainPrefs);
-                }
+                PreferencesUtils.deletePreferenceKey(key, mainPrefs);
+                PreferencesUtils.deletePreferenceKeyByPattern(pattern, mainPrefs);
                 return;
             }
@@ -609,9 +605,4 @@
 
         private void processDownloadElement(Element item) {
-            String address = evalVars(item.getAttribute("url"));
-            String path = evalVars(item.getAttribute("path"));
-            String unzip = evalVars(item.getAttribute("unzip"));
-            String mkdir = evalVars(item.getAttribute("mkdir"));
-
             String base = evalVars(item.getAttribute("base"));
             String dir = getDirectoryByAbbr(base);
@@ -621,11 +612,17 @@
             }
 
+            String path = evalVars(item.getAttribute("path"));
             if (path.contains("..") || path.startsWith("/") || path.contains(":")) {
                 return; // some basic protection
             }
-            if (address == null || path == null || address.isEmpty() || path.isEmpty()) {
+
+            String address = evalVars(item.getAttribute("url"));
+            if (address.isEmpty() || path.isEmpty()) {
                 log("Error: Please specify url=\"where to get file\" and path=\"where to place it\"");
                 return;
             }
+
+            String unzip = evalVars(item.getAttribute("unzip"));
+            String mkdir = evalVars(item.getAttribute("mkdir"));
             processDownloadOperation(address, path, dir, "true".equals(mkdir), "true".equals(unzip));
         }
@@ -641,5 +638,5 @@
             String text = evalVars(elem.getAttribute("text"));
             String locText = evalVars(elem.getAttribute(LanguageInfo.getJOSMLocaleCode()+".text"));
-            if (locText != null && !locText.isEmpty()) text = locText;
+            if (!locText.isEmpty()) text = locText;
 
             String type = evalVars(elem.getAttribute("type"));
Index: /trunk/src/org/openstreetmap/josm/data/cache/HostLimitQueue.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/cache/HostLimitQueue.java	(revision 11380)
+++ /trunk/src/org/openstreetmap/josm/data/cache/HostLimitQueue.java	(revision 11381)
@@ -89,7 +89,5 @@
         }
         job = takeFirst();
-        if (job != null) {
-            acquireSemaphore(job);
-        }
+        acquireSemaphore(job);
         return job;
     }
@@ -119,9 +117,6 @@
         if (job instanceof JCSCachedTileLoaderJob) {
             final JCSCachedTileLoaderJob<?, ?> jcsJob = (JCSCachedTileLoaderJob<?, ?>) job;
-            Semaphore limit = getSemaphore(jcsJob);
-            if (limit != null) {
-                limit.acquire();
-                jcsJob.setFinishedTask(() -> releaseSemaphore(jcsJob));
-            }
+            getSemaphore(jcsJob).acquire();
+            jcsJob.setFinishedTask(() -> releaseSemaphore(jcsJob));
         }
     }
Index: /trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java	(revision 11380)
+++ /trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java	(revision 11381)
@@ -669,5 +669,5 @@
         for (OsmPrimitive p : primitives) {
             Map<String, String> tags = p.getKeys();
-            if (tags == null || tags.isEmpty()) {
+            if (tags.isEmpty()) {
                 continue;
             }
Index: /trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMerger.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMerger.java	(revision 11380)
+++ /trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMerger.java	(revision 11381)
@@ -273,5 +273,5 @@
         public void actionPerformed(ActionEvent arg0) {
             int[] rows = mineTable.getSelectedRows();
-            if (rows == null || rows.length == 0)
+            if (rows.length == 0)
                 return;
             model.decide(rows, MergeDecisionType.KEEP_MINE);
@@ -305,5 +305,5 @@
         public void actionPerformed(ActionEvent arg0) {
             int[] rows = theirTable.getSelectedRows();
-            if (rows == null || rows.length == 0)
+            if (rows.length == 0)
                 return;
             model.decide(rows, MergeDecisionType.KEEP_THEIR);
@@ -403,5 +403,5 @@
         public void actionPerformed(ActionEvent arg0) {
             int[] rows = mergedTable.getSelectedRows();
-            if (rows == null || rows.length == 0)
+            if (rows.length == 0)
                 return;
             model.decide(rows, MergeDecisionType.UNDECIDED);
Index: /trunk/src/org/openstreetmap/josm/gui/datatransfer/importers/TextTagPaster.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/datatransfer/importers/TextTagPaster.java	(revision 11380)
+++ /trunk/src/org/openstreetmap/josm/gui/datatransfer/importers/TextTagPaster.java	(revision 11381)
@@ -40,6 +40,5 @@
 
     private boolean containsValidTags(TransferSupport support) throws UnsupportedFlavorException, IOException {
-        Map<String, String> tags = getTagsImpl(support);
-        return tags != null && !tags.isEmpty();
+        return !getTagsImpl(support).isEmpty();
     }
 
@@ -47,5 +46,5 @@
     protected Map<String, String> getTags(TransferSupport support) throws UnsupportedFlavorException, IOException {
         Map<String, String> tags = getTagsImpl(support);
-        if (tags == null || tags.isEmpty()) {
+        if (tags.isEmpty()) {
             TextTagParser.showBadBufferMessage(help);
             throw new IOException("Invalid tags to paste.");
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/UserListDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/UserListDialog.java	(revision 11380)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/UserListDialog.java	(revision 11381)
@@ -160,5 +160,5 @@
         public void select() {
             int[] indexes = userTable.getSelectedRows();
-            if (indexes == null || indexes.length == 0)
+            if (indexes.length == 0)
                 return;
             model.selectPrimitivesOwnedBy(userTable.getSelectedRows());
@@ -196,5 +196,5 @@
         public void actionPerformed(ActionEvent e) {
             int[] rows = userTable.getSelectedRows();
-            if (rows == null || rows.length == 0)
+            if (rows.length == 0)
                 return;
             List<User> users = model.getSelectedUsers(rows);
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PresetListPanel.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PresetListPanel.java	(revision 11380)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PresetListPanel.java	(revision 11381)
@@ -37,5 +37,5 @@
         public void mouseClicked(MouseEvent e) {
             Collection<OsmPrimitive> selection = t.createSelection(presetHandler.getSelection());
-            if (selection == null || selection.isEmpty())
+            if (selection.isEmpty())
                 return;
             int answer = t.showDialog(selection, false);
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/validator/ValidatorTreePanel.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/validator/ValidatorTreePanel.java	(revision 11380)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/validator/ValidatorTreePanel.java	(revision 11381)
@@ -354,8 +354,6 @@
                     && ((DefaultMutableTreeNode) child).getUserObject() instanceof TestError) {
                 final TestError error = (TestError) ((DefaultMutableTreeNode) child).getUserObject();
-                if (error.getPrimitives() != null) {
-                    if (error.getPrimitives().stream().anyMatch(isRelevant)) {
-                        paths.add(p.pathByAddingChild(child));
-                    }
+                if (error.getPrimitives().stream().anyMatch(isRelevant)) {
+                    paths.add(p.pathByAddingChild(child));
                 }
             } else {
Index: /trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java	(revision 11380)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java	(revision 11381)
@@ -1167,5 +1167,5 @@
 
             Rectangle2D sourceRect = coordinateConverter.getRectangleForTile(tile);
-            if (borderRect != null && !sourceRect.intersects(borderRect)) {
+            if (!sourceRect.intersects(borderRect)) {
                 continue;
             }
Index: /trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayer.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayer.java	(revision 11380)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayer.java	(revision 11381)
@@ -147,10 +147,8 @@
                     return;
                 boolean mousePressedInButton = false;
-                if (e.getPoint() != null) {
-                    for (Marker mkr : data) {
-                        if (mkr.containsPoint(e.getPoint())) {
-                            mousePressedInButton = true;
-                            break;
-                        }
+                for (Marker mkr : data) {
+                    if (mkr.containsPoint(e.getPoint())) {
+                        mousePressedInButton = true;
+                        break;
                     }
                 }
@@ -170,9 +168,7 @@
                 if (!isVisible())
                     return;
-                if (ev.getPoint() != null) {
-                    for (Marker mkr : data) {
-                        if (mkr.containsPoint(ev.getPoint())) {
-                            mkr.actionPerformed(new ActionEvent(this, 0, null));
-                        }
+                for (Marker mkr : data) {
+                    if (mkr.containsPoint(ev.getPoint())) {
+                        mkr.actionPerformed(new ActionEvent(this, 0, null));
                     }
                 }
Index: /trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/PlayHeadMarker.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/PlayHeadMarker.java	(revision 11380)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/PlayHeadMarker.java	(revision 11381)
@@ -64,8 +64,5 @@
             Main.map.mapView.addMouseListener(new MouseAdapter() {
                 @Override public void mousePressed(MouseEvent ev) {
-                    Point p = ev.getPoint();
-                    if (ev.getButton() != MouseEvent.BUTTON1 || p == null)
-                        return;
-                    if (playHead.containsPoint(p)) {
+                    if (ev.getButton() == MouseEvent.BUTTON1 && playHead.containsPoint(ev.getPoint())) {
                         /* when we get a click on the marker, we need to switch mode to avoid
                          * getting confused with other drag operations (like select) */
Index: /trunk/src/org/openstreetmap/josm/gui/oauth/OsmOAuthAuthorizationClient.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/oauth/OsmOAuthAuthorizationClient.java	(revision 11380)
+++ /trunk/src/org/openstreetmap/josm/gui/oauth/OsmOAuthAuthorizationClient.java	(revision 11381)
@@ -213,5 +213,5 @@
         for (String setCookie: setCookies) {
             String[] kvPairs = setCookie.split(";");
-            if (kvPairs == null || kvPairs.length == 0) {
+            if (kvPairs.length == 0) {
                 continue;
             }
@@ -219,5 +219,5 @@
                 kvPair = kvPair.trim();
                 String[] kv = kvPair.split("=");
-                if (kv == null || kv.length != 2) {
+                if (kv.length != 2) {
                     continue;
                 }
Index: /trunk/src/org/openstreetmap/josm/gui/tagging/presets/items/ComboMultiSelect.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/tagging/presets/items/ComboMultiSelect.java	(revision 11380)
+++ /trunk/src/org/openstreetmap/josm/gui/tagging/presets/items/ComboMultiSelect.java	(revision 11381)
@@ -430,5 +430,5 @@
         if (values_from != null) {
             String[] classMethod = values_from.split("#");
-            if (classMethod != null && classMethod.length == 2) {
+            if (classMethod.length == 2) {
                 try {
                     Method method = Class.forName(classMethod[0]).getMethod(classMethod[1]);
@@ -517,5 +517,5 @@
             for (Entry<String, PresetListEntry> entry : lhm.entrySet()) {
                 String k = entry.getValue().toString();
-                if (k != null && k.equals(display)) {
+                if (k.equals(display)) {
                     value = entry.getKey();
                     break;
Index: /trunk/src/org/openstreetmap/josm/gui/util/GuiHelper.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/util/GuiHelper.java	(revision 11380)
+++ /trunk/src/org/openstreetmap/josm/gui/util/GuiHelper.java	(revision 11381)
@@ -439,8 +439,6 @@
         for (GraphicsDevice gd: GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices()) {
             DisplayMode dm = gd.getDisplayMode();
-            if (dm != null) {
-                height = Math.max(height, dm.getHeight());
-                width = Math.max(width, dm.getWidth());
-            }
+            height = Math.max(height, dm.getHeight());
+            width = Math.max(width, dm.getWidth());
         }
         if (height == 0 || width == 0) {
Index: /trunk/src/org/openstreetmap/josm/io/ChangesetQuery.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/ChangesetQuery.java	(revision 11380)
+++ /trunk/src/org/openstreetmap/josm/io/ChangesetQuery.java	(revision 11381)
@@ -393,5 +393,5 @@
         protected Date[] parseTime(String value) throws ChangesetQueryUrlException {
             String[] dates = value.split(",");
-            if (dates == null || dates.length == 0 || dates.length > 2)
+            if (dates.length == 0 || dates.length > 2)
                 throw new ChangesetQueryUrlException(
                         tr("Unexpected value for ''{0}'' in changeset query url, got {1}", "time", value));
Index: /trunk/src/org/openstreetmap/josm/io/OsmApi.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/OsmApi.java	(revision 11380)
+++ /trunk/src/org/openstreetmap/josm/io/OsmApi.java	(revision 11381)
@@ -827,5 +827,5 @@
         StringBuilder urlBuilder = noteStringBuilder(note)
             .append("/close");
-        if (encodedMessage != null && !encodedMessage.trim().isEmpty()) {
+        if (!encodedMessage.trim().isEmpty()) {
             urlBuilder.append("?text=");
             urlBuilder.append(encodedMessage);
@@ -849,5 +849,5 @@
         StringBuilder urlBuilder = noteStringBuilder(note)
             .append("/reopen");
-        if (encodedMessage != null && !encodedMessage.trim().isEmpty()) {
+        if (!encodedMessage.trim().isEmpty()) {
             urlBuilder.append("?text=");
             urlBuilder.append(encodedMessage);
Index: /trunk/src/org/openstreetmap/josm/io/imagery/WMSImagery.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/imagery/WMSImagery.java	(revision 11380)
+++ /trunk/src/org/openstreetmap/josm/io/imagery/WMSImagery.java	(revision 11381)
@@ -243,5 +243,5 @@
             if (child != null) {
                 String baseURL = child.getAttribute("xlink:href");
-                if (baseURL != null && !baseURL.equals(serviceUrlStr)) {
+                if (!baseURL.equals(serviceUrlStr)) {
                     Main.info("GetCapabilities specifies a different service URL: " + baseURL);
                     serviceUrl = new URL(baseURL);
Index: /trunk/src/org/openstreetmap/josm/io/session/SessionReader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/session/SessionReader.java	(revision 11380)
+++ /trunk/src/org/openstreetmap/josm/io/session/SessionReader.java	(revision 11381)
@@ -380,5 +380,5 @@
         String activeAtt = layersEl.getAttribute("active");
         try {
-            active = (activeAtt != null && !activeAtt.isEmpty()) ? Integer.parseInt(activeAtt)-1 : -1;
+            active = !activeAtt.isEmpty() ? (Integer.parseInt(activeAtt)-1) : -1;
         } catch (NumberFormatException e) {
             Main.warn("Unsupported value for 'active' layer attribute. Ignoring it. Error was: "+e.getMessage());
@@ -407,6 +407,5 @@
                     if (idx == null) {
                         error(tr("unexpected format of attribute ''index'' for element ''layer''"));
-                    }
-                    if (elems.containsKey(idx)) {
+                    } else if (elems.containsKey(idx)) {
                         error(tr("attribute ''index'' ({0}) for element ''layer'' must be unique", Integer.toString(idx)));
                     }
@@ -415,5 +414,5 @@
                     deps.putVoid(idx);
                     String depStr = e.getAttribute("depends");
-                    if (depStr != null && !depStr.isEmpty()) {
+                    if (!depStr.isEmpty()) {
                         for (String sd : depStr.split(",")) {
                             Integer d = null;
Index: /trunk/src/org/openstreetmap/josm/plugins/PluginListParser.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/plugins/PluginListParser.java	(revision 11380)
+++ /trunk/src/org/openstreetmap/josm/plugins/PluginListParser.java	(revision 11381)
@@ -95,12 +95,10 @@
             if (name != null) {
                 PluginInformation info = createInfo(name, url, manifest);
-                if (info != null) {
-                    for (PluginProxy plugin : PluginHandler.pluginList) {
-                        if (plugin.getPluginInformation().name.equals(info.getName())) {
-                            info.localversion = plugin.getPluginInformation().localversion;
-                        }
+                for (PluginProxy plugin : PluginHandler.pluginList) {
+                    if (plugin.getPluginInformation().name.equals(info.getName())) {
+                        info.localversion = plugin.getPluginInformation().localversion;
                     }
-                    ret.add(info);
                 }
+                ret.add(info);
             }
         } catch (PluginListParseException ex) {
Index: /trunk/src/org/openstreetmap/josm/tools/HttpClient.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/HttpClient.java	(revision 11380)
+++ /trunk/src/org/openstreetmap/josm/tools/HttpClient.java	(revision 11381)
@@ -209,5 +209,5 @@
                         ) {
                     String content = this.fetchContent();
-                    if (content == null || content.isEmpty()) {
+                    if (content.isEmpty()) {
                         Main.debug("Server did not return any body");
                     } else {
@@ -289,24 +289,22 @@
                 }
             }
-            if (in != null) {
-                in = new ProgressInputStream(in, getContentLength(), monitor);
-                in = "gzip".equalsIgnoreCase(getContentEncoding()) ? new GZIPInputStream(in) : in;
-                Compression compression = Compression.NONE;
-                if (uncompress) {
-                    final String contentType = getContentType();
-                    Main.debug("Uncompressing input stream according to Content-Type header: {0}", contentType);
-                    compression = Compression.forContentType(contentType);
-                }
-                if (uncompressAccordingToContentDisposition && Compression.NONE.equals(compression)) {
-                    final String contentDisposition = getHeaderField("Content-Disposition");
-                    final Matcher matcher = Pattern.compile("filename=\"([^\"]+)\"").matcher(
-                            contentDisposition != null ? contentDisposition : "");
-                    if (matcher.find()) {
-                        Main.debug("Uncompressing input stream according to Content-Disposition header: {0}", contentDisposition);
-                        compression = Compression.byExtension(matcher.group(1));
-                    }
-                }
-                in = compression.getUncompressedInputStream(in);
-            }
+            in = new ProgressInputStream(in, getContentLength(), monitor);
+            in = "gzip".equalsIgnoreCase(getContentEncoding()) ? new GZIPInputStream(in) : in;
+            Compression compression = Compression.NONE;
+            if (uncompress) {
+                final String contentType = getContentType();
+                Main.debug("Uncompressing input stream according to Content-Type header: {0}", contentType);
+                compression = Compression.forContentType(contentType);
+            }
+            if (uncompressAccordingToContentDisposition && Compression.NONE.equals(compression)) {
+                final String contentDisposition = getHeaderField("Content-Disposition");
+                final Matcher matcher = Pattern.compile("filename=\"([^\"]+)\"").matcher(
+                        contentDisposition != null ? contentDisposition : "");
+                if (matcher.find()) {
+                    Main.debug("Uncompressing input stream according to Content-Disposition header: {0}", contentDisposition);
+                    compression = Compression.byExtension(matcher.group(1));
+                }
+            }
+            in = compression.getUncompressedInputStream(in);
             return in;
         }
Index: /trunk/src/org/openstreetmap/josm/tools/WindowGeometry.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/WindowGeometry.java	(revision 11380)
+++ /trunk/src/org/openstreetmap/josm/tools/WindowGeometry.java	(revision 11381)
@@ -204,5 +204,5 @@
     protected final void initFromPreferences(String preferenceKey) throws WindowGeometryException {
         String value = Main.pref.get(preferenceKey);
-        if (value == null || value.isEmpty())
+        if (value.isEmpty())
             throw new WindowGeometryException(
                     tr("Preference with key ''{0}'' does not exist. Cannot restore window geometry from preferences.", preferenceKey));
