pub fn check_slice_empty<T>(slice: &[T], param: &str) -> Result<()>
Checks the slice is empty.
Returns an error if the validation check fails.