 		for prop, i in props
 			if i is props.length - 1
 				unless prop of obj
-					# log.error "Can't set the '#{prop}' property, because this property doesn't exist"
 					continue
+
+				internalProp = getInternalProperty prop
 
 				if val of ATTR_PRIMITIVE_VALUES
 					val = ATTR_PRIMITIVE_VALUES[val]
 
-				switch typeof obj[prop]
+				propType = typeof obj[prop]
+				if propType is 'object'
+					propType = typeof obj[prop]?.valueOf()
+				switch propType
 					when 'number'
+						baseVal = val
 						val = parseFloat val
+						if isNaN(val) and baseVal isnt 'NaN'
+							val = baseVal
 					when 'boolean'
 						if val is ''
 							val = true

			name = prop.slice 'neft:style:'.length
			cache[prop] = name.split ':'

	setAttr: (name, val) ->
		assert.instanceOf @, Style



					unless @setAttrs[name]
						@setAttrs[name] = true
						internalVal = if internalProp of obj then obj[internalProp] else obj[prop]
						@attrValues.push obj, prop, internalVal
					obj[prop] = val
				return true
			else
