Handle value == None in prepare_value