updated tests to check if collection counts elements properly for null elements