Function for checking if container exists