Protect against odd undefined property errors

...which should never happen in the api object, but
for some reason is happening.