Added thrown error if using empty element as a container