NULL in sqlite BLOB column

Came across an odd behavior.

Database as a blob column in which I store a picture. If the picture is nil, it was getting stored and shows in Valentina Studio as NULL. When I do a query on where IS NULL, the row is not selected; so something is in the column.

Fixed by not writing anything if the picture is nil.

SELECT typeof(blob_column), length(blob_column), blob_column FROM table_name;

SELECT * FROM table_name WHERE LENGTH(blob_column) = 0;