code: public boolean isValidInboundLayer() throws InvalidKerasConfigurationException {
          return (getLayer() != null || getVertex() != null || getInputPreprocessor() != null
                  || this.className.equals(conf.getLAYER_CLASS_NAME_INPUT()));
      }
docs: Indicates whether this layer a valid inbound layer. Currently, only
  (known) DL4J Layers and inputs are valid inbound layers. "Preprocessor"
  layers (reshaping, merging, etc.) are replaced by their own inbound layers.
  
  @return boolean indicating whether layer is valid inbound layer
  @see org.deeplearning4j.nn.api.Layer