I would refactor something like this for easier readability:

something like
if canvas_page:
is a bit easier to read