DatabaseServer: Add unittest, and case handling for set_if_empty