Add null_flag to disambiguate null from 'null' from ''.

This way we know the difference between an empty string, the string
‘null’, and the actual value null, which we otherwise lose when
converting all types to text.