Update to error checking and issue #8

Updated the class to handle unexplained errors as well as return a few more details on erroring. Also made a change to handle null variables.