CB-5118 [BlackBerry10] Add check for undefined error handler