def _validate_dict(s, accept_none=False):
    """
	A validation method to check if the input s is a dictionary otherwise raise error if it is not convertable
	"""
    if s is None and accept_none:
        return None
    if isinstance(s, dict):
        return s
    else:
        raise ValueError('{} is not a dictionary!'.format(s))
