list-objects: check if filter is NULL before using