Fix checkbox checkedness setting

Authored by Samwilson on May 19 2017, 1:17 PM.

Description

Fix checkbox checkedness setting

The checked comparison was checking a string against an int,
this change fixes this and adds some function documentation.

Bug: T44254
Change-Id: I4466862ff564388934c35572bb3a0fc45cdfa3c7