if ( element == null ) throw new IllegalArgumentException( "Null elements are not allowed " + "in parameter collections" );
    public void errorIfInvalid(QueryParameter parameter)    {        super.errorIfInvalid( parameter );                if ( ! optional && ((Collection) parameter.value).size() < 1 )            throw new IllegalArgumentException(                    "Requried collection parameters may not be empty."                    );                if ( parameter.value != null )             for (Object element : (Collection) parameter.value )            {                if ( ! elementType.isAssignableFrom( element.getClass() ))                      throw new IllegalArgumentException(                            "Elements of type "+element.getClass().getName()+                            " are not allowed in collections of type "+                            elementType.getName());            }            }