code: public boolean isValid() {
          if (name == null) {
              return false;
          }
  
          if (type == null || !type.isValid()) {
              return false;
          } else if (type == Type.Link) {
              if (url == null) {
                  return false;
              }
          }
  
          // Check actions
          if (this.getActions() != null) {
              for (DesktopAction a : this.getActions()) {
                  if (!a.isValid()) {
                      return false;
                  }
              }
          }
  
          // Everything ok
          return true;
      }
docs: Checks if this link is valid to be saved
  
  @return {@code true} if this link is valid, {@code false} if not.