minor refactoring: nil_or_zero limit check