Prevent empty value elements from being included in filters