Adding null protection.