References to scalars will be encoded as Booleans. Tests/POD also added.