handle ifnonnull at specialize time, too