really accept string in deleteType and check for data before indexing item.