I don't think you need this - if the options aren't there then options.callback and options.errorCode will be undefined anyway.