Mmm makes sense. Thats why I don't like ternary. We could also do:

    env('DEBUG') === null ? 2 : env('DEBUG');