def fetch(key, type, default = nil)
			if (real_hash.has_key?(key))
				value = real_hash[key]

				# if type is not an array, but value is, flatten it.
				if (type != Array && !type.kind_of?(Array) && value.kind_of?(Array))
					value = value[0]
				end

				real = type.from_user_input(value)
				if (real != nil)
					return real
				end
			end
			return default
		end
def fetch(key, type, default = nil)
			if (real_hash.has_key?(key))
				value = real_hash[key]

				# if type is not an array, but value is, flatten it.
				if (type != Array && !type.kind_of?(Array) && value.kind_of?(Array))
					value = value[0]
				end

				real = type.from_user_input(value)
				if (real != nil)
					return real
				end
			end
			return default
		end
Initializes the type safe hash based on an existing normal hash.
 Compares a type safe hash with another.
 Retrieves an item from the hash based on the key. If it's not there,
 or doesn't validate with type.from_user_input(value), returns default.