fixes for NULL pointers and QIF transactions wothout category