Yes. The change or switch in using minoxidil to nanoxidil is completely safe. Most dermatologist would recommend when you do switch, to alternate the products to ease into the change of product on your scalp and within a few days, make a complete switch if desired.
It's important to note as a hair loss, hair growth treatment, these two products can be used complimentary of one another.
Minoxidil vs. Nanoxidil (Spectral.DNC-N) As Compared By A Dermatologist - YouTube