Non-null assertion operator:

Passing null to this function will throw an error

function liveDangerously(x?: number | null) {
  // No error
  console.log(x!.toFixed());
}
liveDangerously(1)