I rewrote the conditional statement to eliminate the return statement:
https://github.com/damiankowal/memory/commit/0cbf65f1cab6b78ab69ec3ebd58a93393fee393c