don't include null values in the query string

At the moment, it dies with a null reference exception.
fix bracket position
Merge pull request #11 from paulduran/patch-1

don't include null values in the query string