public static @Nullable Point getLocation(@NotNull Element element, @NotNull String x, @NotNull String y) {
    String sX = element.getAttributeValue(x);
    if (sX == null) return null;
    String sY = element.getAttributeValue(y);
    if (sY == null) return null;
    try {
      return new Point(Integer.parseInt(sX), Integer.parseInt(sY));
    }
    catch (NumberFormatException ignored) {
      return null;
    }
  }
public static @Nullable Point getLocation(@NotNull Element element, @NotNull String x, @NotNull String y)