Checking if object exists before removing it from index, also checking if solr is running before executing any command besides startsolr and help