As some frameworks automatically add "true" as the value of the attribute, we need to check if it exists instead.