build: do not write undefined to db