code: private boolean checkRequiredTag(IfdTags metadata, String tagName, int cardinality) {
      return checkRequiredTag(metadata, tagName, cardinality, null);
    }
docs: Check a required tag is present.
  
  @param metadata the metadata
  @param tagName the name of the mandatory tag
  @param cardinality the mandatory cardinality
  @return true, if tag is present