Fix logic when checking for transparency or border_style.

A value of 0 is valid for both transparency and border_style. Python evaluates 0 to be False.

Fixes #161