The early return here distinguishes clearly two cases: that with `hasName()` and the other which comprehends other cases analysis.