Add boolean cast

Mainly for cleanliness.
Tweak the thumbnail mode check
Move the thumbnail mode check to a separate method