Added proper handling for case when only one filter is null