Added check on empty string as index name