adding conditional to handle empty location filter