Revert "use maximum instead of max to filter for nil"

This reverts commit 9d32d3ec56c996b76f707737e46c8965fa751867.