Guard against a nil gateway