Python: fixed is_none() for boost v1.40 compatibility.