fix undefined method `to_date' for nil:NilClass WIP
fix undefined method `to_date' for nil:NilClass WIP

Change-Id: Ib4059932592821d691f82cf4412a0323bcb43197
Reviewed-on: https://gerrit.instructure.com/7933
Tested-by: Hudson <dfb64870173313a9a7b56f814c8e3b33e268497a@instructure.com>
Reviewed-by: Zach Pendleton <514dbb4d54d4f29e454990df7d075678f43f92aa@instructure.com>

SwinburneOnline/canvas-lms,fronteerio/canvas-lms,matematikk-mooc/canvas-lms,redconfetti/canvas-lms,sli7246/canvas_branch,snehakachroo1/LSI_replica,instructure/canvas-lms,SwinburneOnline/canvas-lms,sli7246/canvas_branch,sdeleon28/canvas-lms,jay3126/canvas-lms,rup/Tarrax,em2/canvas-lms,sdeleon28/canvas-lms,merichar/canvas-lms,efrj/canvas-lms,gbleydon/canvas-lms,arrivu/hiring-site,instructure/canvas-lms,tgroshon/canvas-lms,snehakachroo1/LSI_replica,nditech/red-innovadores-lms,skmezanul/canvas-lms,arrivu/hoodemo,Jyaasa/canvas-lms,ShreniiNepal/shrenii_lmp,sfu/canvas-lms,eCNAP/CANVAS,instructure/canvas-lms,icelab/canvas,wye0220/shindig-canvas,juoni/canvas-lms,loganrun/pincan,icelab/canvas,greyhwndz/canvas-lms,fronteerio/canvas-lms,antoniuslin/canvas-lms,AndranikMarkosyan/lms,jay3126/canvas-lms,arrivu/hoodemo,utkarshx/canvas-lms,sdeleon28/canvas-lms,sfu/canvas-lms,landonwilkins/canvas-lms,Unow/ins,ankithbti/canvas_lms,grahamb/canvas-lms,shidao-fm/canvas-lms,merichar/canvas-lms,venturehive/canvas-lms,Unow/ins,arrivu/arrivu-lms,juoni/canvas-lms,greyhwndz/canvas-lms,parbros/red-innovadores-lms,sfu/canvas-lms,ankithbti/canvas_lms,AndranikMarkosyan/lms,antoniuslin/canvas-lms,Jyaasa/canvas-lms,parbros/red-innovadores-lms,HotChalk/canvas-lms,wye0220/shindig-canvas,sfu/canvas-lms,skmezanul/canvas-lms,ankithbti/canvas_lms,efrj/canvas-lms,matematikk-mooc/canvas-lms,wrdsb/canvas-lms,usmschuck/canvas,djbender/canvas-lms,dgynn/canvas-lms,roxolan/canvas-lms,usmschuck/canvas,Rvor/canvas-lms,tgroshon/canvas-lms,leftplusrightllc/canvas-lms,gbleydon/canvas-lms,usmschuck/canvas,samuels410/greatlakes-lms,utkarshx/canvas-lms,sfu/canvas-lms,narigone/canvas,SwinburneOnline/canvas-lms,eCNAP/CANVAS,arrivu/hiring-site,djbender/canvas-lms,AndranikMarkosyan/lms,utkarshx/canvas-lms,jay3126/canvas-lms,dgynn/canvas-lms,wrdsb/canvas-lms,tgroshon/canvas-lms,whalejasmine/canvas-lms,leftplusrightllc/canvas-lms,kyroskoh/canvas-lms,instructure/canvas-lms,roxolan/canvas-lms,parbros/red-innovadores-lms,djbender/canvas-lms,ottenhoff/canvas-lms,landonwilkins/canvas-lms,djbender/canvas-lms,Unow/ins,venturehive/canvas-lms,kyroskoh/canvas-lms,narigone/canvas,snehakachroo1/LSI_replica,Jyaasa/canvas-lms,redconfetti/canvas-lms,sdeleon28/canvas-lms,loganrun/pincan,ottenhoff/canvas-lms,nditech/red-innovadores-lms,Unow/canvas-lms,shidao-fm/canvas-lms,shidao-fm/canvas-lms,kyroskoh/canvas-lms,icelab/canvas,wimemx/Canvas,landonwilkins/canvas-lms,HotChalk/canvas-lms,arrivu/arrivu-lms,HotChalk/canvas-lms,instructure/canvas-lms,arrivu/qibla-ecampus,ShreniiNepal/shrenii_lmp,roxolan/canvas-lms,arrivu/qibla-ecampus,roxolan/canvas-lms,samuels410/greatlakes-lms,skmezanul/canvas-lms,sfu/canvas-lms,leftplusrightllc/canvas-lms,leftplusrightllc/canvas-lms,SwinburneOnline/canvas-lms,skmezanul/canvas-lms,tgroshon/canvas-lms,sfu/canvas-lms,narigone/canvas,instructure/canvas-lms,arrivu/qibla-ecampus,dgynn/canvas-lms,redconfetti/canvas-lms,usmschuck/canvas,snehakachroo1/LSI_replica,narigone/canvas,wye0220/shindig-canvas,Rvor/canvas-lms,ShreniiNepal/shrenii_lmp,instructure/canvas-lms,sli7246/canvas_branch,samuels410/greatlakes-lms,grahamb/canvas-lms,fronteerio/canvas-lms,arrivu/jigsaw-lms,venturehive/canvas-lms,Unow/canvas-lms,loganrun/pincan,wrdsb/canvas-lms,Rvor/canvas-lms,wrdsb/canvas-lms,matematikk-mooc/canvas-lms,kyroskoh/canvas-lms,antoniuslin/canvas-lms,va7map/canvas-lms,rup/Tarrax,merichar/canvas-lms,nditech/red-innovadores-lms,samuels410/greatlakes-lms,arrivu/hiring-site,em2/canvas-lms,fronteerio/canvas-lms,va7map/canvas-lms,greyhwndz/canvas-lms,grahamb/canvas-lms,Jyaasa/canvas-lms,grahamb/canvas-lms,arrivu/jigsaw-lms,efrj/canvas-lms,venturehive/canvas-lms,grahamb/canvas-lms,jay3126/canvas-lms,arrivu/jigsaw-lms,va7map/canvas-lms,whalejasmine/canvas-lms,efrj/canvas-lms,antoniuslin/canvas-lms,eCNAP/CANVAS,redconfetti/canvas-lms,wimemx/Canvas,shidao-fm/canvas-lms,juoni/canvas-lms,arrivu/arrivu-lms,ottenhoff/canvas-lms,wimemx/Canvas,matematikk-mooc/canvas-lms,va7map/canvas-lms,dgynn/canvas-lms,nditech/red-innovadores-lms,gbleydon/canvas-lms,rup/Tarrax,ShreniiNepal/shrenii_lmp,whalejasmine/canvas-lms,Unow/canvas-lms,greyhwndz/canvas-lms,AndranikMarkosyan/lms,juoni/canvas-lms,HotChalk/canvas-lms,arrivu/hoodemo,landonwilkins/canvas-lms,em2/canvas-lms,whalejasmine/canvas-lms,utkarshx/canvas-lms,Rvor/canvas-lms,eCNAP/CANVAS