It might be cleaner to simply return ``return filters[filter]['remove'];`` when selected and null when not. You can then truth value test the result but avoid the extra object.