diff --git a/alfa-client/libs/test-utils/src/lib/helper.ts b/alfa-client/libs/test-utils/src/lib/helper.ts
index df9518764f03ddd3cf6a6f24f892405ae004e056..66f33c3579e18d88743d3b23ea96703a2799bb04 100644
--- a/alfa-client/libs/test-utils/src/lib/helper.ts
+++ b/alfa-client/libs/test-utils/src/lib/helper.ts
@@ -26,8 +26,8 @@ import { ComponentFixture } from '@angular/core/testing';
 import { By } from '@angular/platform-browser';
 import { EventData } from './model';
 
-export function getElementFromFixtureByType<T>(fixture: ComponentFixture<any>, component: Type<T>): T | null {
-  return getDebugElementFromFixtureByType(fixture, component)?.componentInstance as T;
+export function getElementFromFixtureByType<T>(fixture: ComponentFixture<any>, component: Type<T>): T {
+  return getDebugElementFromFixtureByType(fixture, component).componentInstance as T;
 }
 
 function getDebugElementFromFixtureByType<T>(fixture: ComponentFixture<any>, component: Type<T>): DebugElement {