def autocast_value(value):
    """Cast string to string, float, bool or None. """
    if value is None:
        return
    value_lcase = value.lower()
    if value_lcase == "null":
        return
    if value_lcase == "false":
        return False
    if value_lcase == "true":
        return True
    try:
        return float(value)
    except ValueError:
        return value