Takes a slice of integers and sorting order, sorts them using the insertion sort algorithm and returns the sorted slice. Returns an error if input is empty or an invalid sorting order is specified.
Expected values for sorting order are "asc" or "desc".