Avoiding a potential null reference error.