restui: Serializing: do not serialize type when null
restui: Serializing: do not serialize type when null

Devices with no type are serialized by the type has to be omitted.
This happens when the database becomes incompatible with the
devices.xml. E.g. we add a device definition temporarily, pair
a device and then revert the devices.xml back.

Related: 8768dfee14cb ("xmlui: Serializing: serialize values from subtypes")
Signed-off-by: Jan Viktorin <3eab6ac54c005c4408f608556a6663b7f2abede7@fit.vutbr.cz>

BeeeOn/server,BeeeOn/server,BeeeOn/server,BeeeOn/server