added some utility methods and npe checks
Merge branch 'master' of github.com:fluxtream/fluxtream-app