Add a null check.
Add a type case check.