Refactor the attribute predicate methods

For all types other than string based types, this calculation ultimately
came down to whether or not we consider the value to be "false", and if
it's blank. For string types alone, "0" should be considered present.
This also allows us to remove the `number?` predicate from the type
objects.
Is having both `query_attribute` and `attribute?` still needed? Given it's a boolean, why can't just keep the `attribute?`