replacing singleton comparison (== -> is)