code: public boolean HasAlgorithmID(AlgorithmID algorithmId) {
          CBORObject thisObj = get(KeyKeys.Algorithm);
          CBORObject thatObj = (algorithmId == null ? null : algorithmId.AsCBOR());
          boolean result;
  
          if (thatObj == null) {
              result = (thisObj == null);
          } else {
              result = thatObj.equals(thisObj);
          }
          return result;
      }
docs: Compares the key's assigned algorithm with the provided value, indicating if the values are the
  same.
  
  @param algorithmId
  the algorithm to compare or {@code null} to check for no assignment.
  @return {@code true} if the current key has the provided algorithm assigned, or {@code false}
  otherwise