code: public static EntityType checkIsEntityType(Type type) {
          if (!isEntityType(type)) {
              throw new ODataSystemException("An entity type is required, but '" + type.getFullyQualifiedName() +
                      "' is not an entity type: " + type.getMetaType());
          }
          return (EntityType) type;
      }
docs: Checks if the specified OData type is an entity type and throws an exception if it is not.
  
  @param type The OData type.
  @return The OData type.
  @throws ODataSystemException If the OData type is not an entity type.