Why can't I simply get activeLayer.name?

I got “15” as printed in “Output”, that went well. And I’m pretty sure I do have selected one and only one artLayer so there should be no way of app.activeDocument.activeLayer returnning undefined.