Add `allow_nil` option.`
Don't map the array if we aren't going to do anything.