Check for null element in the branch array, fixes #56

In my case I found that branchArray sometimes contained a null element at the end. When skipping such elements I was able to get the html report generated. Probably there is a root cause that should be fixed instead?