Check if a declaration with the given name exists.
bool contains(String name) => getByName(name) != null;