An initial default condition of `foo <= 0` seems like a good starting point. If the argument name contains 'index' and there's a collection parameter, maybe `foo < 0 || collectionParameter.Count <= foo`?