The only one that knows your console is flagged or not is ninty, your best bet is to follow safety practices that shared by impeeza above. Good luck.
Edit : the first time i bought my switch its came pre modded with sxos, and unfortunately the seller didn't make any nand backup prior to cfw...