compareTypes(currentType, typeToValidate) {
    let isTypeMatching = currentType === typeToValidate;
    if (Array.isArray(currentType)) {
      isTypeMatching = currentType.includes(typeToValidate);
    }
    return isTypeMatching;
  }
Compares two types and return if they match or not.
In case that the provided type is an array it checks of the typeToCompare exists in.
@param {string | array} currentType the type in schema, it could be an array of types
@param {string} typeToValidate the type to compare
@returns {boolean} the result of the comparation