I don't know of any reason why a column be assigned as NULL. But if you have decided to allow NULL values, then you will have occasional surprises. I would redefine the columns as NOT NULL, with a value of '' or 0 as appropriate to the column type.
If you have NULL columns, you will have occasional hiccups with the SELECT * FROM table construct. You may return some values as NULLs. You appear to have discovered this.
On the server side, if you know a column can return NULL, you could say
SELECT (IF columnname<>'', columnname, 'NULL')
FROM tablename
the php variable receiving the output from the server can now be tested. If you have called this value $row[0]
if($row[0]=='NULL'){echo 'Database had null value';}