simply use `isfinite`