chore(case/transform): add some null checks to prevent NPE