function t.optional(q)assert(t.callback(q))return function(U)if U==nil then return true end local j,Z=q(U)if j then return true else return false,string.format("\040\111\112\116\105\111\110\097\108\041 \037\115",Z or"")end end end
--[[**
	ensures value is either nil or passes check

	@param check The check to use

	@returns A function that will return true iff the condition is passed
**--]]
function t.optional(check)
	assert(t.callback(check))
	return function(value)
		if value == nil then
			return true
		end
		local success, errMsg = check(value)
		if success then
			return true
		else
			return false, string.format("(optional) %s", errMsg or "")
		end
	end
end
