```ts
export function thawRow(row: string, steps: number): string {
  if (typeof row !== 'string' || !row.length) {
    throw new Error('Invalid input: row must be a non-empty string.');
  }
  const validChars = new Set(['#', '.']);
  for (const char of row) {
    if (!validChars.has(char)) {
      throw new Error('Invalid input: row can only contain "#" or ".".');
    }
  }

  if (!Number.isInteger(steps) || steps < 0) {
    throw new Error('Invalid input: step count must be a non-negative whole number.');
  }

  for (let i = 0; i < steps; i++) {
    let newRow = '';

    for (let j = 0; j < row.length; j++) {
      const currentChar = row[j];

      if (currentChar === '#' && (j === 0 || j === row.length - 1)) {
        newRow += '.';
      } else if (
        currentChar === '#' &&
        row[j - 1] !== '#' &&
        row[j + 1] !== '#'
      ) {
        newRow += '.';
      } else {
        newRow += currentChar;
      }
    }

    row = newRow;
  }

  return row;
}
```