Fix initialize db script to not fail if item.list is not provided

initializedb() fails if item.list is not provided. Added just a basic check.