This is better as a match:
```
match first_child {
  Some(first_child) if first_child.is_text() => {
    ...
  }
  _ => ()
}