added a method to check if an object is internal