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