graph and check for type