def get_sql_insert_value(val) -> str:
    """
    Returns the value that would appear in a sql insert statement (i.e. string becomes 'string', None becomes NULL)
    Args:
        val: The original value.

    Returns: The sql insert equivalent value.

    """
    if val is None:
        return "NULL"

    if isinstance(val, str):
        escaped_val = val.replace('\n', '\\n').replace("'", "''")
        return f"'{escaped_val}'"

    return str(val)