am 98fd6405: Merge "Fix NPEs when using the APIs a little oddly." into jb-dev

* commit '98fd6405aec16c6062f562bf6e7c5f2d50da5d60':
  Fix NPEs when using the APIs a little oddly.