return sessionDelegate.perform(new SessionOperation<Boolean>() {
@Override
public Boolean perform() throws RepositoryException {
// TODO: might be expanded, need a better way for this
NameMapper mapper = sessionDelegate.getNamePathMapper();
String oakName = mapper.getOakName(nodeTypeName);
if (oakName == null) {
return false; // An unknown name can't belong to a valid type
}
String jcrName = mapper.getJcrName(oakName);
// TODO: figure out the right place for this check
NodeTypeManager ntm = sessionDelegate.getNodeTypeManager();
NodeType ntToCheck = ntm.getNodeType(jcrName); // throws on not found
String nameToCheck = ntToCheck.getName();