# Lesson XIX
A missing sheet cannot receive even a perfect stroke.
## Try
```prolog
?- nilable(int, Type).
Type = union([int, nil]).
?- nilable(union([int, nil, bool]), Type).
Type = union([int, bool, nil]).
?- must(union([nil, int]), Type).
Type = int.
?- must(union([int, nil, bool]), Type).
Type = union([int, bool]).
?- E = kernel,
infer(E,
[push(bool(false)), push(quote([push(nil)])),
push(quote([push(int(1))])), ifte, must],
Scheme).
Scheme = scheme([], effect(S, [int|S])).
```
## Lesson
`nilable/2` and `must/2` are built on the existing union and nil vocabulary. Introduce operations over the type algebra rather than changing how values are pushed, checked, or compared, which keeps optionality isolated to explicit words.
```prolog
apply(_Env, must, [nil|_Rest], _Stack) :-
!,
throw(error(forth_error(must, nil_value, nil), _)).
apply(_Env, must, [Value|Rest], [Value|Rest]) :-
!.
infer1(_Env, must, effect([Type|Rest], [NonNil|Rest]), Constraints, Constraints) :-
!,
must(Type, NonNil).
nilable(Type, union([Type, nil])) :-
var(Type),
!.
nilable(nil, nil) :-
!.
nilable(union(Types0), union(Types)) :-
!,
subtract(Types0, [nil], Types1),
append(Types1, [nil], Types).
nilable(Type, union([Type, nil])).
must(Type, Type) :-
var(Type),
!.
must(nil, _) :-
!,
fail.
must(union(Types0), Type) :-
!,
subtract(Types0, [nil], Types),
Types \= [],
( Types = [Type] -> true
; Type = union(Types)
).
must(Type, Type).
```
[[18_lesson|Prev]] | [[20_lesson|Next]]