Use the same check as pyactiveresource is doing internally