Add a check to prevent a `null` input.