def str2bool(s):
	"""
	Converts an on/off, yes/no, true/false string to True/False.

	Booleans will be returned as they are, as will non-boolean False-y values.

	Anything else must be a string.
	"""
	if type(s) == bool:
		return s
	if s and s.upper() in [ 'ON', 'YES', 'Y', 'TRUE', '1' ]:
		return True
	else:
		return False