better boolean conversion
remove nils