Updated Type check for shived innerHTML