check for nans and bad step sizes