Adds null reference checks for `GetValue<T>`.

Fixes #134
Merge pull request #136 from leekelleher/feature/issues/134

Adds null reference checks for `GetValue<T>`.