Tests whether the meta_data types are non-complex objects.

 Acceptable types are String, Numeric, TrueClass, FalseClass, and nil.

 @param value [Object] the object to be type checked
350191
def valid_meta_data_type?(value)
      value.nil? || value.is_a?(String) || value.is_a?(Numeric) || value.is_a?(FalseClass) || value.is_a?(TrueClass)
    end
118149
function isValueObject(obj) {
	return (obj instanceof Number) || (obj instanceof String) || (obj instanceof Boolean) || (obj === null);
}
1099937
function value(val, buf, simple) {
  buf = buf || new Buffer(0);
  var type = typeof val;

  // coerce booleans to integers
  val = type === 'boolean' ? Number(val) : val;

  // treat floats as strings
  if(type === 'number' && parseInt(val) !== val) {
    val = '' + val;
  }

  // String instances are treated as simple strings
  if(val instanceof String) {
    simple = true;
    val = val.toString();
  }

  // re-evaluate type after coercion
  type = typeof val;

  if(val instanceof Buffer) {
    buf = _bst(buf, val);
  }else if(val === null) {
    buf = _nil(buf);
  }else if(Array.isArray(val)) {
    buf = _arr(buf, val);
  }else if(type === 'number'){
    buf = _int(buf, val);
  }else if(type === 'string') {
    buf = simple ? _str(buf, val) : _bst(buf, val);
  }else if(val instanceof Error) {
    buf = _err(buf, val);
  }else{
    assert(false, 'invalid encoder type: ' + type);
  }
  return buf;
}
662444
def validate(cls, value):
        
        if value not in cls._valid_settings:
            raise ValueError(
                "%s not a member of %s enumeration" % (value, cls.__name__)
            )
1281425
function _validateTypeValue(v) {
  // can be a string or an empty object
  if(_isString(v) || _isEmptyObject(v)) {
    return;
  }

  // must be an array
  var isValid = false;
  if(_isArray(v)) {
    // must contain only strings
    isValid = true;
    for(var i = 0; i < v.length; ++i) {
      if(!(_isString(v[i]))) {
        isValid = false;
        break;
      }
    }
  }

  if(!isValid) {
    throw new JsonLdError(
      'Invalid JSON-LD syntax; "@type" value must a string, an array of ' +
      'strings, or an empty object.', 'jsonld.SyntaxError', {value: v});
  }
}
581712
def []=(attr, value)
      raise "argument to [] must be a Symbol or a String." unless attr.is_a?(Symbol) or attr.is_a?(String)
      @attributes = { } if !instance_variable_defined?(:@attributes) or @attributes.nil?
      @attributes[attr] = value.to_s
    end
746902
function isValue(val) {
    return (!isUndefined(val)
        && !isNull(val) && !(isNumber(val) && isNaN(val))
        && !isInfinite(val));
}
164516
def value(args = {})
      r = self.raw_value

      case datatype
      when RubyXL::DataType::SHARED_STRING then workbook.shared_strings_container[r.to_i].to_s
      when RubyXL::DataType::INLINE_STRING then is.to_s
      when RubyXL::DataType::RAW_STRING    then raw_value
      else
        if is_date? then workbook.num_to_date(r.to_f)
        elsif r.is_a?(String) && (r =~ NUMBER_REGEXP) then # Numeric
          if $1 != '' then r.to_f
          else r.to_i
          end
        else r
        end
      end
    end
118215
function isTypedArrayLike( value ) {
	return (
		value !== null &&
		typeof value === 'object' &&
		isInteger( value.length ) &&
		value.length >= 0 &&
		value.length <= MAX &&
		typeof value.BYTES_PER_ELEMENT === 'number' &&
		typeof value.byteOffset === 'number' &&
		typeof value.byteLength === 'number'
	);
}
1278842
def data_type=(new_val)
      return nil if @data_type == new_val
      raise JSS::InvalidDataError, "data_type must be a string, one of: #{DATA_TYPES.join(', ')}" unless DATA_TYPES.include? new_val
      @data_type = new_val
      @need_to_update = true
    end
37326
public static function IsNativeType( $value ) : bool
   {

      return (
            \is_bool(   $value ) ||
            \is_int(    $value ) ||
            \is_string( $value ) ||
            \is_double( $value ) ||
            \is_float(  $value ) ||
            \is_array(  $value )
      );

   }
974950
def _ensure_value_is_in_objects(self,val):
        
        if not (val in self.objects):
           self.objects.append(val)
10202
def check_value_and_type(value, data_type):
        
        if value is not None and data_type is not type(None):
            # if not isinstance(value, data_type):
            if not type_inherits_of_type(data_type, type(value)):
                raise TypeError(
                    "Value: '{0}' is not of data type: '{1}', value type: {2}".format(value, data_type, type(value)))
1088304
def _is_valid_datatype(datatype_instance):
    

    # Remap so we can still use the python types for the simple cases
    global _simple_type_remap
    if datatype_instance in _simple_type_remap:
        return True

    # Now set the protobuf from this interface.
    if isinstance(datatype_instance, (Int64, Double, String, Array)):
        return True

    elif isinstance(datatype_instance, Dictionary):
        kt = datatype_instance.key_type

        if isinstance(kt, (Int64, String)):
            return True

    return False
1184024
def _is_valid(self, value):
        

        # Entities have an istypeof method that can perform more sophisticated
        # type checking.
        if hasattr(self._type, "istypeof"):
            return self._type.istypeof(value)
        else:
            return isinstance(value, self._type)
1250832
public static void setValue(MetaLookup metaLookup, AnyTypeObject dataObject, Object value) {
		MetaDataObject meta = metaLookup.getMeta(dataObject.getClass()).asDataObject();
		if (value == null) {
			for (MetaAttribute attr : meta.getAttributes()) {
				attr.setValue(dataObject, null);
			}
		}
		else {
			boolean found = false;
			for (MetaAttribute attr : meta.getAttributes()) {
				if (attr.getType().getImplementationClass().isAssignableFrom(value.getClass())) {
					attr.setValue(dataObject, value);
					found = true;
				}
				else {
					attr.setValue(dataObject, null);
				}
			}
			if (!found) {
				throw new IllegalStateException("cannot assign " + value + " to " + dataObject);
			}
		}
	}
751595
function(value, notValue) {
      value = (typeof value == 'string')
        ? value.toLowerCase()
        : value
      ;
      notValue = (typeof notValue == 'string')
        ? notValue.toLowerCase()
        : notValue
      ;
      return (value != notValue);
    }