At this point `$level` is always string. Converting numeric level to string is already done above.