I would suggest this method accept the `attribute`, and you can eliminate the `if` test here.