Can MySQL automatically convert empty strings to NULL?
Alternatively to NULLIF you could set the default to NULL and just not pass empty fields along.
You can enclose your strings with NULLIF()
You use it like this:
NULLIF('test','') --> returns 'test'
NULLIF('' ,'') --> returns NULL