Provided checks for null and suitable exception handling for clients

One step closer to actually doing something of use :)