title: Why does passing a KerasTensor to Sequential.add not raise a TypeError?
body: <p>In the <a href="https://github.com/keras-team/keras/blob/v2.8.0/keras/engine/sequential.py#L42-L472" rel="nofollow noreferrer">definition</a> of <code>keras.Sequential.add</code>, we have (in accordance with the docs)</p>
  <pre><code>    if isinstance(layer, tf.Module):
        if not isinstance(layer, base_layer.Layer):
          layer = functional.ModuleWrapper(layer)
      else:
        raise TypeError('The added layer must be an instance of class Layer. '
                        f'Received: layer={layer} of type {type(layer)}.')
  </code></pre>
  <p>and yet, when I execute</p>
  <pre><code>model = keras.Sequential()
  model.add(keras.Input(100))
  </code></pre>
  <p>a <code>TypeError</code> is not raised. <code>keras.Input</code> returns a tensor, and the <a href="https://github.com/tensorflow/tensorflow/blob/9334a8cc0cc5c54fc20b1efc386892a5e5db3656/tensorflow/python/keras/engine/keras_tensor.py#L40" rel="nofollow noreferrer">definition</a> of a <code>KerasTensor</code> shows that it inherits from an <code>Object</code>, and not a <code>Layer</code>.</p>
  <p>Why can I add an <code>Input</code> to a <code>Sequential</code>, rather than being required to add an <code>InputLayer</code> as I would expect?</p>