handle potentially null values from database
Merge branch 'master' of github.com:bitrepository/reference