I don't think node can ever be None here. A similar check for insert_block is right above this one.