Add null checks.