made LocationType.database nullable