but this should be `else if (node != null)`