Using [] for check and filter preserves type