ORM: is it possible to preserve NULL with serializeJSON()?

a = {
  key = null

will output:


But if a is an ORM entity, then serializeJSON(a) will output:


Is it possible to make serializeJSON() output null for an Entity?

Otherwise I have to check the existence of an Entity’s attribute (or column) before using it. It’s tedious and doesn’t make sense.