By default Geb ensures that your content definitions return non empty elements. If your content is optional you can tell it using required
content option:
name(required: false) { input.getAttribute("name").toString() }
Because Geb utilizes Groovy Truth to redefine how navigator are coerced to boolean values(empty navigators are falsey and non-empty are truthy) you can simplify your exists
method to:
boolean exists() {
input
}