fix wordCount handling of null input

so we added a test for null, this helps