Cast number to boolean before using as condition
Cast number to boolean before using as condition

Possible fix for issue #2019

Change-Id: Id143d3dd79d44897e0c0376c726a50378887e73f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/287971
Tested-by: Service Cloud Jenkins <9144042a601061f88f1e1d7a1753ea3e2972119d@instructure.com>
Reviewed-by: Weston Dransfield <e9203059795dc94e28a8831c65eb7869e818825e@instructure.com>
QA-Review: Weston Dransfield <e9203059795dc94e28a8831c65eb7869e818825e@instructure.com>
Product-Review: Jacob Burroughs <8ecea6e385af5cf9f53123f5ca17fb5fd6a6d4b2@instructure.com>

sfu/canvas-lms,instructure/canvas-lms,sfu/canvas-lms,sfu/canvas-lms,instructure/canvas-lms,instructure/canvas-lms,sfu/canvas-lms,instructure/canvas-lms,sfu/canvas-lms,instructure/canvas-lms,instructure/canvas-lms,sfu/canvas-lms,sfu/canvas-lms,instructure/canvas-lms