parameters: (val)
docstring: Ensures a boolean value if a string or boolean is provided
  
      For strings, the value for True/False is case insensitive
docstring_summary: Ensures a boolean value if a string or boolean is provided
docstring_tokens: Ensures a boolean value if a string or boolean is provided
function: def ensure_boolean(val):
      """Ensures a boolean value if a string or boolean is provided
  
      For strings, the value for True/False is case insensitive
      """
      if isinstance(val, bool):
          return val
      else:
          return val.lower() == 'true'
function_tokens: def ensure_boolean ( val ) : if isinstance ( val , bool ) : return val else : return val . lower ( ) == 'true'