public static boolean isPlaceholderShape(int[] shape) {
        if(shape == null)
            return true;
        else {
            for(int i = 0; i < shape.length; i++) {
                if(shape[i] < 0)
                    return true;
            }
        }

        return false;
    }
public static boolean isPlaceholderShape ( int [ ] shape ) { if ( shape == null ) return true ; else { for ( int i = 0 ; i < shape . length ; i ++ ) { if ( shape [ i ] < 0 ) return true ; } } return false ; }
Returns true if any shape has a -1
or a null or empty array is passed in
@param shape the input shape to validate
@return true if the shape is null,empty, or contains a -1 element