Fix bug with handleResponse

If the success callback accepts a single boolean parameter and it is set to 'false', the callback isn't called. Use typeof to determine if the result is specified.
Merge pull request #9 from TobyEalden/handleResponse-bug

Fix bug with handleResponse