Null checks and remove useless sync blocks