avoid NPE

The change at line 231 "if (transact != null) {"