Narrows the type to P if the value is present and has actually the type of P.
@override Maybe<P> type<P>() => value is P ? (as<P>()) : Nothing();