 							# output HTML attr?
 							else if htag[3] and not htag[5]
 								# null value?
-								if val is null
+								if not val? or val is null
 									# erase "attr=" part
 									out = out.replace(/[\w-_]+=$/, '')
 								# output boolean HTML attr?

	///


	escapeHTML = (val) ->
		(val? and val or '')
			.toString()

				newVal = change.object[change.name]
				if attr in ['value', 'checked', 'selected']
					this[attr] = newVal
				else
					if (typeof newVal is 'boolean' and not newVal) or newVal is null
						this.removeAttribute(attr)
