function checkIsCorrectType(value, schema) {
  if (_.has(schema, 'type') &&
    typeof schemaTypeToJsValidator[schema.type] === 'function') {
    const isCorrectType = schemaTypeToJsValidator[schema.type](value);
    if (isCorrectType) {
      return true;
    }
  }
  return isTypeValue(value, schema);
}
Checks if value is correct according to schema
If the value should be numeric, it tries to convert and then validate
also validates if the value is a correct representation in the form of
<long> or <integer> etc for integers format 32 or format 64
@param {string} value - Value to check for
@param {*} schema - The schema portion used in validation
@returns {Boolean} the value is the representation of its type