Fix apt module's boolean check to expect converted value

Fixes #2218.