Recognize (unquoted) NULL as such.
Use the state instead of a separate field.