Insets (@Nullable Insets custom, @NotNull Insets def) { if (custom != null) { return new Insets(getValue(def.top, custom.top), getValue(def.left, custom.left), getValue(def.bottom, custom.bottom), getValue(def.right, custom.right)); } return def; }