My function in google apps script returns an "Exception: Bad value". My script is copying certain rows from my main data to another sheet, a snippet below. However, it