Default [Q]Custom Rom + Custom Kernel question

is it safe to go back to stock kernel and rom using odin from any custom rom and kernel i flashed as long as i do it via odin?