Add filter for nullable integers

Currently a nullable integer field gets filtered to a 0, which causes an error for nullable fields that are foreign keys.