I think this line should be inside the `if pull` otherwise it will fail if pull is null.