Extra check to prevent null reference error.