The check is done because the method calls itself recursively.