def _validate_float(s, accept_none = False):
	"""
	A validation method to convert input s to float or raise error if it is not convertable
	"""

	if s is None and accept_none :
		return None
	try:
		return float(s)
	except ValueError:
		raise ValueError('Could not convert "%s" to float' % s)