Fix NPE in CheckSideEffects