Removed duplicate object type check