Store all valid results into the result array. The only invalid type is undefined.