Add null check.
Refactor ManualSync class.