Probably the worst thing that can happen to you while flashing custom ROMs is losing your IMEI, which is a result of your EFS partition becoming corrupt. Although this does not happen often, there are times you may need to make sure you have a backup of your EFS by making a backup. The simplest way to do this is to make a backup using TWRP recovery right after you root. To backup up EFS, boot into TWRP, choose backup, then only check EFS, which will backup your EFS partition. Now this backup is usually only 2MB and will not take up much space on your phone but can be instrumental in recovering your IMEI quickly and easily in case it is lost.