The standard library module typecons in package std provides the struct Nullable, which takes a single template argument. This allows for the creation of nullable primitives.
import std.typecons; Nullable!int maybeIntValue;