Function isSome

Generic TypeGuard against null or undefined values.

const maybeValue: string | undefined = "TypeScript";
isSome(maybeValue)
// => true
// typeof maybeValue is string