Do some extra null checks.