Consider this line:
if (object.getAttribute(\"someAttr\").equals(\"true\")) { // ....
Obviously this line is a potential bug, the attribute
I like option 1 and I would argue that it is readable enough.
Option 3 btw would be to introduce a getAttribute method that takes a default value as a parameter.