implemented checks for empty collection or empty elements
new interface