Fixed yet another potential NPE exception.

Unexpected, yet observed in the wild!
Merge pull request #13 from dreisch/another_npe_fix

Fixed yet another potential NPE exception.