I'd drop the outer parens and do:

    if value is None or (value == '' and connection.features.interprets_empty_strings_as_nulls):

This modification also needs a test as the test you've added passes without it.