Add isfinite check for GHS