Check for null reference.