Should asking for diagonals outside of a matrix throw an error?

Shouldn’t this throw an error instead?

julia> diag(randn(5,5),5)
Float64[]

It used to, but was removed by v0.7 for needless obstructions: Remove checks in tril, triu, and diag by andreasnoack · Pull Request #28480 · JuliaLang/julia · GitHub. FWIW, an empty vector/matrix is an unspecified convention also found in MATLAB and NumPy.