Add null protection.