Fix 'is object' check