No, it's not called with only non-null nodes. I changed it to avoid a lot of non-null in the calling code. Checking for null will not affect performance.