Mattdrayer/api null points check

@martynjames -- here's a first attempt at resolving the invalid operator issue you're seeing -- take a look and let me know what you think.