Filter out undefined values.