You will also need to ensure that the condition also handles Null values.
There are some other examples of filtering shown in the default ProcessRecords script displayed when the Transform node is added to the canvas. Also see the examples shown in the Transform node online help, which show the effect of setting the output record to None and the use of the implicit write mode.
You may also be interested in the Migrating to Dataverse guide which covers scripting and other differences between Dataverse and the Lavastorm LAE product:
https://installers.lavastorm.com/Dataverse320/Migrating+to+Dataverse.pdf
In addition, a useful way understanding the Python code is to look at the automatically generated code in the Advanced tab of the Filter node once some filter criteria have been specified using the filter grid editor.
Regards,
Adrian