Added error checking helpers
Added error checking helpers

Change-Id: I37d5d27dfe69544c8cfab72be776c00b477189e5
Reviewed-on: https://gerrit.instructure.com/59132
Reviewed-by: Matt Fairbourn <5f353e1c97bb9cc046b9db20beca0b9392f6f1b2@instructure.com>
Product-Review: Matt Fairbourn <5f353e1c97bb9cc046b9db20beca0b9392f6f1b2@instructure.com>
QA-Review: Matt Fairbourn <5f353e1c97bb9cc046b9db20beca0b9392f6f1b2@instructure.com>
Tested-by: Jenkins

grahamb/canvas-lms,utkarshx/canvas-lms,AndranikMarkosyan/lms,tgroshon/canvas-lms,whalejasmine/canvas-lms,juoni/canvas-lms,snehakachroo1/LSI_replica,utkarshx/canvas-lms,leftplusrightllc/canvas-lms,juoni/canvas-lms,efrj/canvas-lms,juoni/canvas-lms,fronteerio/canvas-lms,antoniuslin/canvas-lms,matematikk-mooc/canvas-lms,sfu/canvas-lms,kyroskoh/canvas-lms,greyhwndz/canvas-lms,narigone/canvas,narigone/canvas,efrj/canvas-lms,venturehive/canvas-lms,efrj/canvas-lms,grahamb/canvas-lms,skmezanul/canvas-lms,redconfetti/canvas-lms,venturehive/canvas-lms,utkarshx/canvas-lms,whalejasmine/canvas-lms,jay3126/canvas-lms,efrj/canvas-lms,juoni/canvas-lms,venturehive/canvas-lms,antoniuslin/canvas-lms,instructure/canvas-lms,antoniuslin/canvas-lms,sdeleon28/canvas-lms,greyhwndz/canvas-lms,utkarshx/canvas-lms,dgynn/canvas-lms,HotChalk/canvas-lms,grahamb/canvas-lms,skmezanul/canvas-lms,sfu/canvas-lms,sfu/canvas-lms,instructure/canvas-lms,matematikk-mooc/canvas-lms,matematikk-mooc/canvas-lms,SwinburneOnline/canvas-lms,roxolan/canvas-lms,AndranikMarkosyan/lms,narigone/canvas,redconfetti/canvas-lms,sfu/canvas-lms,tgroshon/canvas-lms,sdeleon28/canvas-lms,leftplusrightllc/canvas-lms,kyroskoh/canvas-lms,roxolan/canvas-lms,greyhwndz/canvas-lms,sdeleon28/canvas-lms,sfu/canvas-lms,snehakachroo1/LSI_replica,roxolan/canvas-lms,whalejasmine/canvas-lms,redconfetti/canvas-lms,skmezanul/canvas-lms,whalejasmine/canvas-lms,djbender/canvas-lms,redconfetti/canvas-lms,fronteerio/canvas-lms,HotChalk/canvas-lms,HotChalk/canvas-lms,roxolan/canvas-lms,greyhwndz/canvas-lms,sfu/canvas-lms,instructure/canvas-lms,jay3126/canvas-lms,SwinburneOnline/canvas-lms,grahamb/canvas-lms,dgynn/canvas-lms,tgroshon/canvas-lms,jay3126/canvas-lms,SwinburneOnline/canvas-lms,sfu/canvas-lms,grahamb/canvas-lms,snehakachroo1/LSI_replica,dgynn/canvas-lms,sdeleon28/canvas-lms,instructure/canvas-lms,instructure/canvas-lms,HotChalk/canvas-lms,snehakachroo1/LSI_replica,AndranikMarkosyan/lms,fronteerio/canvas-lms,kyroskoh/canvas-lms,fronteerio/canvas-lms,instructure/canvas-lms,narigone/canvas,kyroskoh/canvas-lms,leftplusrightllc/canvas-lms,jay3126/canvas-lms,venturehive/canvas-lms,AndranikMarkosyan/lms,djbender/canvas-lms,matematikk-mooc/canvas-lms,SwinburneOnline/canvas-lms,leftplusrightllc/canvas-lms,djbender/canvas-lms,skmezanul/canvas-lms,antoniuslin/canvas-lms,djbender/canvas-lms,dgynn/canvas-lms,instructure/canvas-lms,tgroshon/canvas-lms