Fix objec type check