This feels a bit forced to me. Catching NoMethodError doesn't really address the issue, but more so a side effect of the issue at hand. I think one thing we can do here is ensure our lambdas always receive an integer.