Return sum unless it's within a certain range of values