better handling of typed nils