Refactor (use early return to avoid unnecessary work)

Hi,

There doesn't seem to be any mutating behaviour in the method, so the change seems safe to me.