Adding conditionals to prevent errors in mb_solr and mb_location