Avoid null reference when processing element lookup.
Avoid another null reference.